I would assume that the airline provides the chocolates as a matter of policy. In a few cases, crew fund very minor perks for certain passengers, such as pilots optionally giving the plastic wing pins to kids. Sometimes crew optionally will make some special effort, such as a good luck new year's card or an airline postcard signed by the crew, and any very minor expensive for this might be covered by the purser or pilot. In some other situations, either as a gift or a customer service gesture you might be given stuff on board (such as a higher cabin amenity kit of beverage) or something to take with you (a leftover bottle of wine from the flight's catering) by crew who know that it doesn't matter (or might even be encouraged by the airline, for example if a medical professional provides assistance during the flight and is given a nice bottle of champagne as a thank you).
Pleasse don't feel guilty that crew may be paying from their own pocket or at risk of discipline for violating rules when you receive such gifts and gestures. Enjoy!