I've always suspected that this isn't so much about kids with allergies not being able to be near peanuts or what have you, but more about the fact that you can't really rely on kids to not share food or trust that kids can evaluate what they're eating to know whether they're allergic to it. I think because it's hard to control whether little Bobby is going to give his peanut butter sandwich to little Jimmy a lot of schools feel like it's more responsible to just say no peanut butter when they have a severe peanut allergy, for example.
My stepsister is severely allergic to all fruits, nuts and about a kabillion other things. She has to be super vigilant in restaurants - you wouldn't believe the amount of times that we have been assured something doesn't have nuts and one of us will taste it for her and find a walnut or whatever. But she has lived well past the age of 5, and can be around us when we're eating nuts or what have you.