Unions don’t prevent getting rid of dead wood, people get fired from union jobs regularly. The point is they need an actual pretext to fire someone, and layoffs are more difficult.
It’s mostly protection vs the Amazon style fire people regularly so we can avoid paying unemployment insurance when we do seasonal layoffs etc.
Some of this just comes down to both being local government jobs run by a multitude of independent systems some of which are going to be far below average. There are ~13,506 school districts in the US, so the bottom 5% consists of 675 different systems with a huge range of issues.
The other issue is it can be hard to get replacements.
And I've heard of teachers who are universally disliked by students, teachers, and administrators who are too difficult to fire. These are people who get switched to a new co-teacher every single year because the last one refuses to work with them again.
It’s mostly protection vs the Amazon style fire people regularly so we can avoid paying unemployment insurance when we do seasonal layoffs etc.