In addition, the management companies have a cozy relationship with food processers, which routinely pay the companies rebates (typically around 14 percent) in return for contracts. The rebates have generally been kept secret from schools, which are charged the full price.

Last year, Andrew M. Cuomo, then the New York State attorney general, won a $20 million settlement over Sodexo’s pocketing of such rebates. Other states are following New York and looking into the rebates; the Agriculture Department began its own inquiry in August.

With the crackdown on these rebates, food service companies have turned to another accounting trick. I found evidence that the rebate abuses are continuing, now under the name of “prompt payment discounts,” under an Agriculture Department loophole. These discounts, for payments that are often not prompt at all, are really rebates under another name. New York State requires rebates to be returned to schools, but the Sodexo settlement shows how unevenly the ban has been enforced.

The food service companies I spoke with denied any impropriety. “Our culinary philosophy, as a company, is to promote scratch cooking where possible and encourage variety and nutritionally balanced meals,” said Ayde Lyons, a Chartwells spokeswoman. “We use minimally processed foods whenever possible.”

There are economic and nutritional consequences to privatization. School kitchen workers are generally unionized, with benefits; they are also typically local residents who have children in public schools and care about their well-being. Laid-off school workers become an economic drain instead of a positive force. And the rebate deals with national food manufacturers cut out local farmers and small producers like bakers, who could offer fresh, healthy food and help the local economy.

Children pay the price. Dr. Zullo found that privately managed school cafeterias offered meals that were higher in sugar and fats and made unhealthy snack items — soda, cookies, potato chips — more readily available. The companies were also less likely to use reduced-sugar recipes. Linda Hugle, a retired school principal in Three Rivers, Ore., told me that when her district switched to Sodexo, “the savings were paltry.” She added, “You pay a little less and your kids get strawberry milk, frozen French fries and artificial shortening.”

Advocates who fight for better food face an uphill battle. Dorothy Brayley, executive director of Kids First, a nutrition advocacy group in Pawtucket, R.I., told me she encountered resistance in trying to persuade Sodexo to buy from local farmers. (Sodexo says it does buy some local produce and has opened salad bars in many schools.) Donna D. Walsh, a former school board president in Westchester County, N.Y., told me she worked with a supportive superintendent to get Aramark to stop deep-frying food and to open a salad bar. But after a new superintendent came in, she said, the company went back to profit-driven menus of pizza and bagels.