> Most organisations meaningfully described as unions has a non-trivial element of excluding people from the trade in one way or another. I will never be a part of any organisation that will prevent any person from (trying to) make a living as a programmer in whatever way.
The problem is that, once an industry unionizes, you don't really have a choice.
The process of decertification is basically a catch-22: unions are actually allowed to terminate membership of employees who advocate decertification, which makes it impossible to organize enough support for decertification from current members without risking losing your membership.
And that's all assuming that you actually hold the majority view. It's quite possible that the majority of your coworkers want to (for example) ban Asian workers from obtaining work visas. If that's the case, you can't really do anything to stop your union from supporting it either.
That example isn't hypothetical, by the way. Banning immigration from Asia was one of the first major victories of the American Federation of Labor.