I know that at my high school there were a lot of students who would have taken advantage of being able to leave school and would have gone off and smoked pot, (I would have been one of those people) and the school cannot be having that. Also the school is still liable for the students so if they get hurt or in trouble the school can be sued so they want to keep their hands clean on that.
High school kid have a lot of choices if they leave school, they could be potting or smoking, but not everyone is like that. some people just want to leave school just to buy their own or to hang out with their friends. and if their doing pot, that not a big of a deal and it outside of school. if i were to be a big contact with the school, then you would be right.
High school kids are still kids, as in not legal adults, most of them anyway so they don't really have the right to just leave. And to suggest that kids doing drugs and then coming back to school is not a big deal you are being ridiculous. If you want to buy some lunch then buy it before you come to school and heat it up in school. Schools are not going to risk liability just because students don't want to make their own lunch. Also if they did allow this to happen then it would lead to a collapse of the school lunch programs because if all the students could leave then most would no longer buy lunch at school making it no longer economically viable to continue but the poor students that need government subsidized meal plans cannot afford to have this taken away.