I could be totally wrong but it might be dangerous to assume we are attracting only the best and brightest, no? Seems like we are attracting anyone on the spectrum who can dole out some money to a university and get a stem degree.
Moreover, even if most foreign born students in a STEM program were merely as good as native students, as you suggest, that still puts them intellectually and educationally well above the average citizen, let alone the average immigrant.
There is no way that it does not make sense to offer foreign STEM students green cards, so long as the university is reasonably accredited.
So, the point of these programs isn't citizen enrichment. The point is job training.
Consider: philosophy is also intellectually demanding, but I don't see "Philosophy for All" educational initiatives.
I think a lot of people who oppose CS Ed investments are self-interested, but that doesn't mean there aren't genuine problems with government policies that tie themselves too closely to today's labor market.
If we're not careful, "learn to code and you'll have a job" will be tomorrow's equivalent of "get a college degree and you'll have a job".
It already is. It's not a matter of if the bottom will drop out of STEM=JOBS, but a matter of when.