So I am not really fit in english language, but around here chocolate and coffee are normally not called food, but an "Genußmittel" = (best translations I can get) consumption-ressource. While the word food is more used for "really" food. So as example a normal yoghurt with normal fruit is "food", while a pudding or artificial sweetie-yoghurt would be "Consumption-ressource" So I think its more obvious for people, that chocolate and coffee is something you can eat for general, but that you need to take care for the right amount and the misadvantages, because of them having no food-use (in the meaning of being no everyday normal food you use for feeding yourself during day), but something that you simply eat out of enjoyment, just as you smoke a cigarette or drink wine. (Which are in german language as well "consumption-foods".
And yop, according to how dangerous the misadvantages are, I think most of us believe that its pretty normal that some of that "consumption-ressources" are forbidden to feed to children. When it comes to substances, that offer no enjoying benefit at all, as chocolate does, but only offer negative disadvantages, I dont see whats so bad about something that is simply no food, and additional also no "consumption-ressource", because of it delivering no pro for the one who eat its, not calling food and not to allow company to sell stuff, that is no food, as food. To buy chemicals, DIY-stores exist. ^^