Except the special needs students. And the ones with severe physical and learning disabilities. And the ones who have trouble getting food at home. And the ones who don't have school supplies, which the teachers buy out of their own pockets.
Oh, and the free childcare that teachers also provide during the daytime! It's not exactly working out well, now that that's temporarily on hold due to the pandemic.
Brainwaves like this are rarely productive when you think about them in the context of an entire society. But I actually think if you told parents "Here's this $10k, and good luck. The school buildings are going away.", they wouldn't take it.
Once we burden the education system with solving society ills, you fail at the main goal. This is called scope creep.