At the bare minimum: unions increase job security and provide a formal disinterested (or even positively interested) recourse mechanism against your employer. They also decrease your employer's ability to leverage the collective pressure of other employees against you.
To be honest, I don't actually want to work at a place that has better job security.
Obviously, I wouldn't mind better job security for just myself; but if the downside is that my employer can't get rid of the dead wood, I'd rather work elsewhere.
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.
Think about what happens when you get older and those job offers are harder to get, or you have a family you’d like to spend time with, or your health is a limiting factor, or the new owners look at the payroll and decide your job could be done better by their buddy’s company in Romania. The time to invest in a union is before you need it.
The last thing I want is job security for incompetent coworkers. You see this playing out in teachers unions where they go to bat for sexual predator teachers.
So the only time in my life I would have actually wanted a union was when I grew bored on a project I was on for a few years and coasted for 3-4 months doing minimum acceptable amount of work, before deciding I'm going to rot there and switching jobs. If only I had a union, I could have been coasting for years ;)