Why? Assuming you're talking about a standard US union and not something like a guild, it would ultimately suppress wages for the top talent to provide job security to the other end of the bell curve.
However, unions in practice enforce mediocrity while also becoming an institution that exists to support itself (aka its leaders) rather than its members once it reaches a large enough size (which is not unique to unions at all).
Unions makes no sense for a top performer in a field where an individual can outperform other workers performing similar tasks by orders of magnitude. Software development is one of those fields.
What part of that do you take issue with?