While I have known many bright and capable people from other countries, I have also met total chowderheads - in two fields. Remember that before I switched career tracks, I was a chemist. So I have seen these foreign-born people from the zenith to the nadir in abilities. They are human - as good or as bad as any of use. Just as smart. Just as stupid.
From the conversations I have had, the really good folks you mentioned are that way because of the incredibly intense competition that spurs them on to greater heights. That in turn occurs because their countries are so overcrowded that there is no chance for mediocrity. In those conversations, more than one of them has described the competitive processes such that if 10 scholarships are available, not less than 50 people will be competing for it. The cost of that education is beyond the income of parents of humble means, and it is a great family tragedy when someone fails out of their scholarship, because that ends their college career. So when they GET their degree, they were already culled by a societal form of "survival of the fittest." Which perhaps explains your perception. You are already looking at the top 20% of their group.
Years ago, Yahoo had chat rooms (long before Facetime and Skype) where kids would come to unload. At least a couple of dozen times I would chat with someone who was despondent for failing out of school. These people were from Japan or Taiwan back then, and they were seriously considering suicide because their lives were over (according to family attitudes). They KNEW they had doomed themselves to a life of mindless menial labor by their failure. They KNEW (due to their culture's current attitudes) that they had shamed their family. I bring this up because it explains to at least some degree the intensity of social pressure to reach for that degree, to compete and climb that ladder. Therefore, if you are seeing the folks who have that degree and learned that technology, you aren't seeing the general population.
I will address another issue for the purpose of clarification. With government contracting requiring security clearances, which was true for the job I had as a Navy contractor, non-citizens are instantly disqualified. Good, bad, or indifferent, that is a Congressional mandate. So with the Navy job, I saw foreign-born guys and gals, but they had gone the "citizenship route" long before they got in with the contracting companies. Given the age group and a knowledge of history, it was not surprising to me that the bulk of foreign-born that I saw early in my career were Vietnamese who escaped the infamous "fall of Saigon."
For what it is worth, Adam, you might be amused to know that J.N., one of the Windows admins in my Navy group, didn't like Microsoft products that much either - because it was HIS job to configure them so that we could make a "master installation" disk we used to re-image new machines with all of the new security rules in-place. J. would have torn his hair out if he had any left. But he was a very knowledgeable guy from Vietnam who would probably have fallen into your category of "bright people." Other than having somewhat of a difficult accent when he got excited, he was an OK guy to work with.