Way way wayyyyyyy back in the mid80's when my kids started elementary school here in super conservative East Tn, treats brought into the classroom for birthdays, Halloween, Christmas or Valentine's parties, had to be "store bought".
I thought this was absurd, and since I was a home room mother and could bake cupcakes that were not only better than store bought but cheaper, I wanted to know why! Teacher told me it was "county-wide School Board policy, no exceptions".
Huh? I wanted a better explanation. So I went to the school office, and the school secretary told me - when no one else was standing around - "because not everyone in this county is going to have a clean kitchen and rather than risk food poisoning or any other problem, the county decided that NO ONE could bring in homemade food for the students." When I got that explanation, it made sense for some of the schools in the county to adopt that policy, but I didn't see why it would for
my kids' school. It was then pointed out to me that I was an "outsider" and I needed to think about the reasoning behind the
county-wide philosophy.
Weird thing was....including a bake sale in the yearly school fundraiser was acceptable! Apparently,
selling homemade foodstuffs is different than
giving it out.

As far as the peanut allergy/bee sting thing. I was a school "nurse" when the kids were in elementary school, and every year we had a list of the kids who had these allergies, that was posted on the bulletin board in the "clinic" and in the office. The epi-pens were kept under lock and key in the office. There were not that many kids with the allergies in a school of about 400-500 kids.
It does seem like these days, there are more kids with peanut allergies and very severe ones at that. I have to wonder what is causing the high increase and the severity of the allergies.
Who ever heard of "lactose intolerant" before the mid-late 80's? Gluten allergies? Smell a peanut and go into anaphylactic shock?
Have to wonder if all these allergies aren't somehow connected to the way food is grown and processed and the additives that are put in to stimulate growth or preserve the food.
I carried an epi-pen for years because of Praise Allah seasoning that practically every restaurant was using as a food enhancer. It was loaded with MSG. I learned to ask when going to a new restaurant if they used the stuff and order something that didn't have it in it, or not go back.