I don't really understand that system though. The schools around here in SA don't have cafeterias unless you're in college, so its hard for me to fathom why anyone would stop a child from bringing their own lunch to school, within reason. Unfortunately these schools to have shops (Tuck Shops) where they can buy snacks, healthy snacks...
I think it has many different facets though. My girls go to a semi private school in the area, and parents get notices in the beginning of the year to kindly remind them not to pack sweets into their kids' lunch boxes. Which I can understand because of two reasons,
A) I'ts a bad nutrition choice, and
B) Many kids cannot tolerate too much sugar or MSG etc. and it gives the teachers problems when trying to teach them.
I have had a look at the tuck shop at the school and can honestly say they do try uphold good nutrition rules and only have cake sales on Fridays, because school comes out early.
if you think about it, trying to curb on things like tartrazine, Monosodium glutamate (MSG) and many sugars and starches help the kids to concentrate better and help teachers remain sane

at the same time.