As a well paid software engineer who wants to work with high performing colleagues, nothing my union has said has suggested they aren't supportive of this. They are about holding companies to account, not entrenching poor performers or normalising salaries around some middle ground.
Bear in mind also that there has been a near century long war of propaganda against the idea of unions. There's a lot of negative connotation built up in media, discourse, expectations, etc.
Fundamentally, a union for software engineers is just not going to work the same as a union for, say, manufacturing. There's a lot that mostly doesn't apply to us like physical safety, but a lot more that does like whistleblowing.
Firing "lazy non-performers" is easy, you just follow the steps.
1) warning about performance, in written form with someone present 2) second warning 3) fired.
The American way where a boss can just come in and say "you're fired, gather your things and security will escort you out" will never fly here.
The process is there to make sure the reason for firing is explicitly stated and understood by both sides. It also gives some safeguards that just a personality conflict between people can't be used to fire someone, there has to be a proper reason beyond "I don't like your face"
Companies can also fire people when they hit a downturn, but there's a catch. If they claim it's for "economic reasons" (there's a specific turn of phrase they need to use here that doesn't translate) they then need to primarily re-hire the people who they fired if they start hiring for the same positions again.
Unions are not the answer.
Factory unions protect the collective uniformly because each person is interchangeable. This is a “raise the minimum” type environment. They make it hard to fire because they need to hold the line.
Some unions are structured to support highly skilled and differentiated labor. Like in Hollywood. They protect workers like camera-men but still allow skilled actors to be well paid and properly audition for roles.