Unions work on both goals simultaneously, increasing wages but also providing job security to their base, inserting strong restrictions on who can perform certain labors etc. The more employees, the higher the power of the union, it's not like a competitor could spring up and kill their host.
It's not a white/black issue, laborers need protection but should not use a privileged position in the economy to seek a rent at the expense of everybody else.