A company that spurned talent it badly needed couldn't thrive. The same is true for a country.

But that isn't stopping the Trump administration from blithely driving foreign students into the open arms of other countries with its ill-advised immigration policies.

For three years in a row, the number of new foreign students enrolling in American universities has fallen. In the 2015-16 academic year, 300,743 new foreign students enrolled. That number dropped to 269,383 in 2018-19, a decline of 10.4 percent as per the data of Open Doors, the Institute of International Education's (IIE) annual report that tracks university enrollments. Nor is the situation likely to improve in the academic year currently underway given that a snapshot survey of 500 universities by the IIE this fall found declining enrollment — although full stats won't be available until later in 2020.

When enrollments initially started plummeting, many people blamed external factors like better educational opportunities at home or Saudi Arabia's decision to yank government scholarships from Saudi students studying abroad rather than this administration's anti-immigration agenda. While other things might have had an effect on the margin, if they were the main cause, then other countries would be experiencing a decline too. The opposite is the case.

National Foundation for American Policy's Stuart Anderson points out that Canada has been attracting a record number of international students in recent years. In 2017, it experienced a 20 percent spike and then another 16 percent the following year, a phenomenon that Canadians call the "Trump bump." Meanwhile, Australia experienced a whopping 47 percent increase in new foreign students between 2015 and 2018.

In particular, America is losing Chinese students while Australia is gaining them. One likely reason is that Trump has called them all spies (an absurd accusation given that that 9 out of 10 would prefer to stay on and work in America rather than return to the communist dictatorship) and threatened to ban them from the country in a naked bid to force Beijing to succumb to his trade demands. Trump didn't make good on that threat but, in 2018, he capped the visa stay of Chinese students in sensitive fields to one year rather than allowing them to stay for the maximum time allowed. This not only made Chinese students feel unwelcome in the United States but also perhaps made it more precarious for them to pursue an education here lest they lose their visas before finishing their program.

In addition, his travel ban has subjected foreign students from Iran and various Muslim countries to extreme vetting.

He has also proposed rules that would make it easier to brand foreign students as being "unlawfully present" and to ban them from the country for 10 years. The courts have put this rule on hold for now but the uncertainty can hardly make American universities attractive.

Trump has also doubled down on sting operations to crack down on visa fraud. Last year ICE arrested 250 foreign students, mostly from India, whom it lured into the University of Farmington, a fake university that it set up in metro Detroit. For tuition fees much lower than normal, this university handed these students transcripts to satisfy the terms of their visas and, more importantly, obtain CPT (Curricular Practical Training) status. This status lets the foreign students sign up for a paid internship off campus and offset their steep tuition costs, a tempting deal because it enables them to work for more than 20 hours and get off-campus jobs. Many foreign students quit legitimate universities to join this fake one only to get caught in ICE's dragnet.

But it's not just draconian enforcement tactics that are turning away foreign students. The administration's immigration policies are also making an American education an unattractive value proposition compared to other countries.

Trump is doing everything in his power to make it more difficult for foreign students to work in America after they graduate, making the high-cost of an American education a bad investment. Right now, international students in highly coveted STEM fields can obtain something called the Optional Practical Training visa to work in the country for 36 months after graduation. This allows them to recover some of their tuition costs before returning home. Trump is proposing rules to cut this back dramatically.

Likewise, his administration is also making it more difficult for foreign techies to work in the country long-term by rejecting new H-1B visa applications at a historically high rate. And he is making it much more difficult for those who have these visas to renew them.

This is the exact opposite of what Sen. Mitt Romney (R-Utah) said the country should be doing when he ran for the presidency in 2012. He had promised to staple green cards — not just H-1Bs — to the diplomas of foreign graduates, especially in STEM fields, because it made no sense for America to lose American-trained talent to other countries. Instead, it is Canada that is running with Romney's suggestion. It is handing foreign graduates from Canadian universities many additional points when they apply for permanent residency so that they just stay in Canada rather than return to their native countries.

Turning away foreign students is particularly stupid — not only because we need their skills but also their tuition dollars. Over 66 percent of them, especially undergraduates, pay top dollars for their education from out-of-pocket or through outside sources, allowing universities to subsidize tuition costs for American students. Many international graduate students, meanwhile, provide teaching and research services in exchange for a tuition reprieve, especially in STEM fields, something that allows universities to offer a more cost-effective education than if they had to hire faculty for the same jobs.

Furthermore, foreign students contribute $37 billion to the American economy and create or support 450,000 jobs, according to NAFSA: Association of International Educators, an outfit that promotes the professional development of American college officials. Indeed, without them, the shortage of Americans in STEM fields would become even more acute because there wouldn't be enough people to train Americans, generating a downward spiral of STEM scarcity.

But the most vital contributions of international students are intangible. Had it not been for them, America may not have spearheaded the IT revolution. That's because 57 percent of Silicon Valley's STEM workers were born outside the country and many of them came to the United States as students and stayed on. Many iconic IT companies such as Microsoft and Google are currently being headed by foreigners who came to America as graduate students.

Instead of draining the swamp, Trump is draining talent from America that other countries are eagerly sucking up. This is a formula for making them great, not America.

Want more essential commentary and analysis like this delivered straight to your inbox? Sign up for The Week's "Today's best articles" newsletter here.

Editor's note: This article originally misstated the visa process for certain foreign students. It has been corrected. We regret the error.