It's a lot easier to blame immigrants for issues like unemployment and poverty, than it is to gain class consciousness and understand that it's the bourgeois class who're at fault.
the bourgeois class knows this, so they push the narrative that immigrants, minorities, etc. are the source of the nation's problems. doing this keeps proletarians from simply banding together to exact real change, because we're too busy with infighting for that.