There are too many profitable incentives to poor education that are conspiring to perpetuate it. An ill-educated populace is easier to manipulate, gravitate towards consumerism, and won't hold their leaders as accountable. Power generally resides with those who benefit from an ill-educated populace, so anything that would actually help educate children and people at large is discouraged.
I'll repeat what others have said here. Giving teachers the means with which to properly work with their students, and investing in students at a more individual level, is what's needed. Sadly, my refrain with regards to public education is that is has become little more than glorified babysitting. Those that succeed do so in spite of the system, and not because of it. Meanwhile, students that suffer from one or more disadvantagements (poverty, disability, social issues, mental or physical health issues, and so much more) tend to just...suffer more. And then they fall into cycles where preventable issues repeat or enhance into the next generation. They'll still spend all of their little income excessively, so profit is still to be had, or they'll end-up in prison, which, again, thanks to privatization, is also immensely profitable, so no problem there, right?
The system is setup to fail because that's what's profitable in the long run for those seeking such profits. And because they can lobby, and use their wealth to influence politics, it won't change. Something else needs to happen first.