Do the comparison again controlling on country of origin. E.g., how do US citizen students with families from Japan compare with students still in Japan? Instead of Japan, substitute Canada, India, Pakistan, the Philippines, South Korea, England, Germany, Finland, Sweden, Norway, the Baltic countries, the Balkan countries,
Austria, Switzerland, Israel, Poland, Russia, France, Spain, Italy, Singapore, Turkey, Iraq, Iran, the Gulf States, North Africa including Egypt, West Africa, Central Sub-Saharan Africa, East Africa, South Africa, Mexico, Brazil, ....
The US is a uniquely diverse country, and such a diverse country necessarily will have a tough time competing
in average performance scores with better countries that are not diverse and, instead, have a quite uniform culture. So, right away on average scores, the US will have a tough time competing with much of Europe and the better Asian countries.
Also understand that the famous, prestigious US universities -- Harvard, Princeton, Yale, Cornell, MIT, Johns Hopkins, NYU, Columbia, most of the SUNY schools, most of the Big Ten, CMU, Chicago, U. Washington, most of the University of California campuses, Stanford, Caltech, University of Texas, Rice, Georgia Tech, etc. are RESEARCH universities and do not concentrate on technical or vocational training for software developer positions where H1Bs are common.
The OP was in part discussing education in the US and claiming that the education is inferior to the education in several other countries. Some of the evidence is some test scores on some tests given internationally.
Okay: We're considering education quality and using test scores as evidence.
Well, it is Social Science 101 (my wife's Ph.D. was in mathematical sociology, and my brother's Ph.D. was in political science) to control on other likely explanatory variables.
So, an obvious candidate alternate explanatory variable is culture of the country of the recent ancestors of the students.
So, to compare education in the US with that in, e.g., Japan, we should see how (A) US students of recent Japanese descent compare with (B) Japanese students in Japan. So, now are holding culture reasonably constant and, thus, doing better comparing the schools and whatever else we have not controlled on.
Not to control on culture would be grade F in Social Science 101 and give total garbage results.
I.e., no fair blaming the education in the US when the real cause of the differences is culture and not the education.
The US is a uniquely diverse country, and such a diverse country necessarily will have a tough time competing in average performance scores with better countries that are not diverse and, instead, have a quite uniform culture. So, right away on average scores, the US will have a tough time competing with much of Europe and the better Asian countries.
Also understand that the famous, prestigious US universities -- Harvard, Princeton, Yale, Cornell, MIT, Johns Hopkins, NYU, Columbia, most of the SUNY schools, most of the Big Ten, CMU, Chicago, U. Washington, most of the University of California campuses, Stanford, Caltech, University of Texas, Rice, Georgia Tech, etc. are RESEARCH universities and do not concentrate on technical or vocational training for software developer positions where H1Bs are common.