For unions in the vacuum though... if we assume no other workers exist and no innovation is possible, unions (at least, US-style unions) would have no reason to exist - company cannot replace workers, or between multiple companies it can only replace workers in a game of musical chairs, so all the workers individually would have great bargaining power.
An approximation: tech 5 years ago, maybe even now, I haven't interviewed recently.
So, the only/main reason unions need to exist is to protect the jobs of their members against (1) other workers, including immigrants (2) being obsoleted by innovation. That is not incidental to their goals, that is their whole goal. I find both of these incentives to be inherently evil (I am also self aware enough to know that while e.g. banning AI coding innovations, any further immigration of developers and outsourcing to boot would be amazing for my compensation, it's still evil)