When you can’t fire bad apples, you end up with problems like the police force having violent cops or racist cops that make everyone look bad. Or you have teachers that refuse to go back to work even though there are vaccines available to them.
Unions make sense in circumstances where a company has a monopoly granted by the government… For example Boeing. Boeing has completed a regulatory capture that makes it nearly impossible to launch competing airline building companies.
Unions do not make sense where they do not have a counterparty to negotiate against… Basically there should be no unions for government employees because politicians generally already are willing to do the will of the workers over that of the best interests of the citizens. Unions also do not make sense in highly competitive spaces where if a company underpays or mistreats its employees, those employees can just switch jobs immediately.