Because if you're a US citizen, getting a PhD for the money is a racket. Just take your BS in CS over to Silicon Valley and start making bank working on Tinder for Dogs. Want to make six figures and have a shot at a billion dollars? The surest way to NOT do that is to go to grad school.
If you're NOT a US citizen, getting a graduate degree is a great way to get into the US, do work that gets you noticed by big companies or labs, and then get a job at those companies or labs once you graduate. Many of those jobs will be in the US, and having a PhD will make your visa application smoother (so I hear) because you have an advanced degree.
Foreign students have more to gain, so more apply. That's not hard.
p.s. for the US overall, in 2013[1] 47% of the students enrolled in math & CS were permanent residents, so it seems unlikely that your statement "The percentage of students of Asian ethnicity will probably outnumber all other groups combined" is true.
[1] http://cgsnet.org/ckfinder/userfiles/files/GED_report_2013.p...
https://www.insidehighered.com/news/2013/07/12/new-report-sh...
The main thing holding Canada back is a similar increasing focus on "commercializable" research at the expense of basic science. Long-term commitment to excellence in basic science is what opens up new fields. Preferentially funding research with the latest buzz-words tends to make a country a follower of trends.
In absolute numbers, there was a decline in U.S. nationals earning science & engineering doctorates from 1995 through 2002, but the trend is upwards again since 2002.
Chart: http://www.nsf.gov/statistics/sed/2013/digest/theme1.cfm#cit...
I don't know how it used to be 20, 30 or 50 years ago, but if you have sat in a graduate science/technology/engineering course classroom in any US university in the last few years and surveyed the demographic profile of your fellow classmates you might notice something.
The percentage of students of Asian ethnicity will probably outnumber all other groups combined. I admit this is only anecdotal.
A fairly large percentage of those students (who are not already US citizens) will try to find work here and contribute to the US economy if they can. However due to the increasingly difficult immigration climate many of them will return home and become the spearhead of innovation for their home countries.
I don't know if that is the same in the US undergraduate programs.
In net, you have two factors here, 1. Fewer US based students are going into graduate STEM programs. 2. More US educated foreign STEM graduate students are being trained to contribute to your future competitors.
I wonder what that does that to the long term prospects for home grown innovation in the US.
Just citing one study [1] below. I am sure there are even more counter studies.
[1] http://www.brookings.edu/research/interactives/2014/geograph...