Yes, unionize to sacrifice the larger population of qualified people for the gain of those lucky enough to get a union position.
A union in this case would benefit the majority, but at the cost of people not in the union. Tighter/more strict immigration would benefit the people in the country in terms of reducing downward wage pressure, but it would remove opportunity for people abroad/non-citizens.