@jcboy,
Well with store bought goods at least you have the ingredients list and the possible disclaimer that might indicate if the same machines used to make product x (with peanuts) is also used to make product y (without peanuts) but where product y still has a possible exposure to peanuts. With this disclaimer in mind, teachers can veto or allow certain store purchased items by looking at the ingredients and going by a case by case basis.
The same can't be said about home cooked items unless the child is vetted in the possible crosscontamination of the brought in home cooked items with any other possible trace amounts of common food allergenic products. You can't expect the child to know all of the ingredients of a home cooked item plus whatever food products that have been cooked in that same kitchen that might 'contaminate' the food brought to school.
I think it's a tad overkill but the school doesn't apparently want to take chances.