People love candy, especially chocolate. Candy makes an especially effective shareable gift because a lot of people don't buy or eat candy on their own. However, they will eat some when it's offered to them as a gift. That's why so many companies are using candy as a shareable office gift.
In an imprinted box or bag, candy is easily identifiable and you can even have the individual candy or bar imprinted with a logo. As this imprinted candy makes its way around the office, more people will share and see your logo as they spread the "sweet" word. Candy is a sweet way to spread your message and create goodwill with your customers.