Because way too many of those teachers and schools weren't doing their jobs.
Why were illiterate students graduating from high school?
Easy - because we started keeping score.
Used to be, the kid passed or failed on his own ability and merit. Then we got it into our head that there were "better" schools and "bad" schools and "good" and "bad" teachers. (Which I will conceded only in the sense that some kids and teachers are bad matchups for each other, just like employees and bosses).
Anyway, how do we find these folks? We start scoring, treating the kids like completely interchangable parts, and assuming that a teacher who passes less kids must somehow be "worse", which teachers with higher marks and pass rate must be "great". Fail too many kids? That's your fault, so maybe you won't get a raise or promotion or maybe we'll just find another teacher.
Go figure they start pushing kids along. (We haven't even tackled the classic problem of parents lobbying)
Of course, punting Bobby up a grade doesn't help Bobby, and now the new teacher gets handed a kid who's even *less* likely to pass the next year's material - which means the new teacher either has to take the performance hit or punt the kid himself. And that's why Bobby can't read.
So, we put in standardized testing to "prove" that kids all know the material, and tie it even more firmly to teacher's reviews. If I tell you your job is to do things A through Z, but I'm going to test you on only items A, E, I, O, and U - and the results of that test will directly determine if you have a job next year... how much time do you think you're going to spend on the other items in comparison?
Oh yeah, and meanwhile we're going to make you feel like a dirty union worker, make sure we penny-pinch any resource you might need (other than whatever the Government Flavor Of The Week is - seriously, my daughter's classroom looks like a tech wonderland, but there's a hard limit on how many photocopies the teacher can make), and then lambast them for not rejoicing in the glories of educating the nation's youth with sufficient exuberance.
So let me revise my earlier statement. I've never met a "bad" teacher in a classroom. Teachers who don't want to teach end up in other fields (I know a few in human resources, one was a project manager; and a few just get promoted to management) . I've met a few burned-out teachers in classrooms, though - burned out because they're spending their own wages to buy basic supplies (fun fact: all those helpful posters in your kid's classroom? Paid for by the teacher), burned out because the joy of teaching has been replaced by hours of standardized testing and reviews and a culture that now treats teachers as a cost centre to be minimized.