I'm inclined to agree that some schools take it too far, & don't think it through - nothing wrong with a nice slab of cake as part of a balanced lunchbox.
But: there's a lad in my tutor group, aged 15, who stops off at the bakery on the way to school for a bacon butty & a bun. Then he sits in my classroom drinking Red Bull & eating chocolate (or rather, he would had we not spent the last 4 years at war over it...I've won .
He eats (crisps) & drinks (pop, including energy drinks) in every lesson in which he thinks he can get away with it.
He has a 'panini' from the canteen at break - our 'Healthy Eating' award means we don't serve pizza. Oh no. We toast tomato puree & cheap grated cheese in a white baguette, rather than smearing the puree & cheese on a white pizza base, & we call it a panini.
& another bun.
He eats & drinks crap in another two lessons.
Then he has lunch - pasta, topped with baked beans & cheap grated cheese. With a side of chips. & a bun.
Two more lessons, more pop. More crisps & chocolate.
He lives off takeaways at home.
I know all this because I've been his tutor for 4 years, & whilst I have no control over what he eats, we have discussed it because his eating in class constantly gets him in bother.
Obviously, he's overweight, heading quite quickly towards obese. His behaviour & attitude are a problem, & his self-esteem's low, although he tries to hide it by being aggressive.
He's been like this since he was a chunky 11 year old, & doubtless before, & it's not down to packed lunches because he doesn't have them - it's because he sees eating crap all day, every day, as the norm.
& I really believe that good school lunches & a straightforward policy on what food is allowed to be brought into school, could've influenced his habits. His mum's been involved in endless discussions about his behaviour, & the subject of his diet has been raised - her line is a) it's none of school's business & b) she has no control over him & it's too late to start now.
'Jake' is an extreme example of the eating habits I encounter daily amongst children at a very well regarded secondary.
My own kids are 5 & under, & I keep an eye on what they eat. Neither dh nor I are slim! But 'Jake's parents obviously don't, won't or can't. If a rule that my dc can't take chocolate in their lunchbox means fewer kids eat like Jake, then I'm entirely supportive of it.
They won't suffer by it - it's ridiculous to suggest that I can't get enough calories into them on sandwiches, fruit & a yoghurt! Ds has a good breakfast, eats according to school rules, is collected by CM, has a couple of biscuits, comes home, has tea.
If I want to give him sweets or chocolate as a 'treat', & they certainly aren't banned in our house, there's no shortage of hours in the day in which to do so.