A few corrections/additions to this.
America has a visa program called H-1B they drafted back in 1990. Initially it allowed America to hire outside of America to address talent shortfalls in the USA and the minimum salary was really high when it was released (nearly a 150K per annum salary in today's money). How it was initially drafted, at least from my understanding, is that you would genuinely want to look for American workers first due to the high salary cap.
The problems with it now, as-is, is several - the salary cap wasn't adjusted for inflation, so allows companies to undercut American wages with cheap foreign workers, it traps people that come over in jobs with atrocious work conditions, which they can't quit without losing their visa, and companies aren't scouting for American workers and are actually discriminating against them in the process. It's kind of hard to argue against some of the criticisms of the program when H-1B is being used for difficult jobs such as 7-11 cashiers and frycooks.