Which is utter horse shit, but it’s where we are today.
The result is that many schools don’t really track teacher performance, and as you indicate you can get wild inconsistencies.
The best parents can do (other than leaving) is to aggressively direct kids into the better teachers’ classrooms. We see that all the time - one class has kids who’s parents are “in the know” and gets the good teacher, the other class is where the kids get dumped who’s parents don’t complain. The district knows who is bad and who is not, but is afraid to anger the union, so anything short of actual violence by a teacher against a student won’t have any consequences.
Our school district local enrollment as a result has declined from around 900 kids to just 650 in just a few years as a result. The kids left are those too poor to go private or home school, those not lucky or connected enough to go to a “choice” school, and a small number of die hard loyalists reliving their glory days through their kids at the same school they went to.