I think its different.
At my sisters school, you have to sign a permission slip at the beginning of the year for everything. Whether you want your childs picture taken, you want them in the year book, you want them participating in parties... yadda yadda. Bringing coffee to kindergartners is far fetched, and so is soda. Hopefully the teacher would have more common sense. However, if the parent doesn't want their child eating sweets, the parent should tell the teacher that at the beginning of the year. My sisters teacher provides them with snack during the day, whether it be chips, crackers, pretzels, cookies... and they are sent home a slip at the beginning of the year, and if you dont like it, your child will not be provided with snack.
However, I can't see why someone would do that to their child. If theres a birthday party in the class room, and there are cupcakes, and your child is the only one that CANT have them, you can imagine how the child would feel.
Usually, when there is a class party, everyone is asked to bring something, so by that, the parents have a "heads up" that there will be a party. They can simply send in a note, but if the child feels left out, that's the parents fault.
Theres a diabetic in my sisters class, and I've taken it upon myself, to get a "special" cupcake, every time there is a class party for her, (with her mothers permission) because I can only imagine how it feels to be 7 years old, watching everyone eat cake, and not being able to have any.
8 year old sister.