The obvious first problem is that American students, who have to pay tens of thousands of dollars to attend universities and stay in debt for most of their lives can't compete with students from other countries where education is subsidized or free. American students end their undergrad deeply in financial trouble and can't continue on to advanced degree programs which is why these programs are stacked with foreign nationals.
The second problem is the preference of US tech corporations for hiring foreign nationals over US citizens. Not having an accent can be a problem when trying to get a job at a firm that is trying to put on a diverse and multinational image.
Finally, someone came up with the idea that in the US, human beings are not supposed to expect to be able to survive. Survival is not a god-given right in American society we are told. Just because someone spent half their life learning an engineering or science discipline doesn't mean they deserve or should get an engineering or science job or any job for that matter. This is the current state of mind in the US, that employment and survival, forget about research and development, are only for the lucky.