This is a way to reverse the worrisome talent drain in which the best, brightest and most ambitious scientists and engineers leave their home countries to work in the United States. Look up Qian Xuesen to see how this can work. He was a promising Chinese graduate student at Caltech and worked with von Karmann at JPL. During the red scare, he lost his security clearance and was deported to China where he headed Mao's program to develop nuclear weapons and ballistic missiles. He was America's gift to Mao and China's military and industrial capacity. He's still honored today in China for his work on systems engineering and developing Chinese technological infrastructure. By discouraging foreign scientists, the US is doing other countries a favor. For example, India will stop losing IIT graduates who, working in India, will advance India's science and industry. Other nations will benefit as well. Meanwhile, the US will stagnate since choosing one's scientific workforce based on racial and religious categories makes it less likely that good ideas will be developed.
Sucks for the US, but we voted for it.