I too have lots of allergies. Fortunately, none of them is serious enough to put me in hospital. I know that they get worse when I'm stressed. I can pinpoint the times when I became allergic to something new to a point in my life when something difficult was going on. But that's not the point about the cakes. They could just ask that all the ingredients be listed.
To be fair to the teachers, if a child brought in a home-made cake and someone got food poisoning then the teachers would get it from all angles: the parents, the press, the governers. It's a sad fact of life that you can't trust anybody and you can too easily be blamed. But then, how do they know the cake in the box hasn't been tampered with?
Zoe