Unions typically protect workers who belong to industries where there are more employees than there is demand.
Programming is a highly-skilled profession that is constantly in demand. We don't need protection because companies compete for the good ones, not the reverse.
Because the people most in demand in the industry are the ones who have the most to lose in collective wage bargaining.
Unions by design are democratic institutions, and thus protect the average worker. Good programmers will be hurt by a union more than they will be helped, so the union shops will be stuck with lousy programmers and lose in the market.