Most schools across the country have contracts to get their meals from corporate food service providers. These providers are big, often multi-national companies that provide meals to schools, hospitals, and prisons.
They buy huge amounts of food from big, industrial farms at very low prices, making lunch inexpensive for the schools and profitable for the companies. Some schools have exclusive contracts, meaning they can only buy their food from the companies, and others have looser arrangements. Either way, school food budgets are based on these sorts of deals, which means there's very little money available for lunch.