When I was at school (a state grammar, from 67 - 82) you weren't allowed out at lunchtime unless you were a "home dinner", or in the 6th form. The "Tuck Shop" was open for 10 minutes a day, during morning break and was a late addition (in 78 I think). No such things as vending machines.
Packed lunches are a different matter - I'm confident not every parent has the time or the cash to prepare nutritious lunches every day for multiple kids. Mind you, they wouldn't have to if the schools were providing decent grub and the parents insisted their kids ate them.