The bourgeoisie use foreign workers to help drive down wages and working conditions. The two main ways are through transferring their capital to other countries or by bringing cheaper labour to where their capital is. The former is really difficult to counter however the latter, which can easily breed xenophobia bolstered by the bourgeoisie through the media etc, can be countered through organising with migrant workers to make sure their working conditions are equivelant to non-migrants.
The xenophobia fostered by the bourgeoisie serves a vital purpose, it helps split the working class making it less likely that people will organise together and try to get better conditions. Your solution, heavy restriction on migration, won't solve the problem at all as they can only be solved through struggle and the first step of that struggle which would help unify workers is making sure migrants don't have worse conditions than non-migrants.



