- Students are generally compelled to be proximate to educational services for long stretches of time. Logistics of not coupling them would be inefficient.
- Students don't learn effectively when they are chronically hungry. Providing education to hungry students isn't maximizing society's investment in these comparatively expensive services.
- Bonus reason: for many students, school is the only institution they have significant contact with, and therefore nobody else is feeding them. Feeding kids is the Right and Moral thing to do.
Students here eat too, the different is they eat what they, or their parents want them to. And when they want to. Most schools also sell food. Nobody has to be hungry.
The difference is there is no super cheap daily meal all students have to choose from. And also kids and public schools can get healthy food if their parents want to/ can afford it.
Based on your description, I gather you are not in the United States :-)
In my opinion the best case is a society where all kids have parents with the care and understanding to send them to school with nutritious, healthy food. And that students have healthy choices and that they have the means to purchase.
But the kicker, is that in the United States (and some other countries), this is not the case. In the United States, children in dysfunctional or impoverished homes or no home are common enough that it's more efficient to broadly provide support in this manner.
Side note: my wife, who previously was a teacher, and I lived in New Zealand for a few years. New Zealand didn't have a school nutrition program, but probably needed one. My wife did a fair amount of substitute ("relief") teaching in a poor area north of Wellington when we first arrived, and gave her lunch away to hungry students often enough that she knew to pack several sandwiches. So, even countries with comparably strong social supports can run into this issue.
- Students are generally compelled to be proximate to educational services for long stretches of time. Logistics of not coupling them would be inefficient.
- Students don't learn effectively when they are chronically hungry. Providing education to hungry students isn't maximizing society's investment in these comparatively expensive services.
- Bonus reason: for many students, school is the only institution they have significant contact with, and therefore nobody else is feeding them. Feeding kids is the Right and Moral thing to do.