It's not really true any longer, but it was at one point. The head of the AFL-CIO admits here that unions were strongly anti immigration for decades. Only in the past few years have they changed their official opinion.
https://www.npr.org/2013/02/05/171175054/how-the-labor-movem...