The H-1B program allows companies and other employers in the United States to temporarily employ cheap foreign workers in occupations that require highly specialized knowledge. Many businesses outsource work to other countries for additional cost savings. Companies rely heavily on automated testing to mitigate the downside of hiring less skilled developers. You have worse UX but they spend less money. What can you do.
Are you implying that immigrants or devs working remote from other countries are less competent? If so, consider how much additional hurdles those guys had to overcome in order to find a job in the US.
From browsing software engineering literature from the early 2000s, the common issue seems to be communication or processes, which is the fault of the hiring company, not that of the developers/consultancy themselves.