I think school policies need to be clear about what food is accepted and what is not. Some schools allow juice, others dont. Some allow fruit bars, others dont.
If parents are aware of what the rules are, then they should accept the school policy and not put their children in an embarrassing sitation by giving them food that they are not allowed to have. Parents can give the "banned food" at home.
Some parents dont seem to realise what the impact of a poor diet does to a child when in school. Some are dehydrrated, starving, tired and therefore lack concentration, may misbehave or be generally disruptive. Then the teachers have to deal with this instead of teaching.
Some parents send their kids to school with so little food, or fill their boxes with crisps, chocolate, sweets and sugar drinks and nothing that is good for the body.
As the teacher is having to deal with these children then they should be allowed to see what they are eating to see if there is a connection.
If a child is eating fruit, veggies, drinking water and no sweets or sugary stuff at all and still misbehaving, half asleep then that is a different issue that they could investigate.
The food we give our kids makes a huge difference.