I grew up in a former eastern block country.

There are many reasons for this:

In USSR and other communist countries, there was a pressure towards having more scientists, engineers and highly trained specialists. To achieve this, they had to foster excellence.

US educational system is optimized for inclusion, diversity and money making. This means technical and scientific subjects are watered down so nobody is left behind. USSR and eastern block educational systems were built to cater to the most gifted students and produce scientific excellence. That is also true for some parts of Europe today, China, India and South Korea and maybe some other asian countries.

There was also a lack of distractions so it was easier for the kids in schools and students in universities to concentrate on learning.

In general, kids were expected to do a lot of homework each day and during vacations - I remember doing tens of math exercises each day and hundreds in vacation.

There were special classes in high school for more talented kids - where they got to do more math, physics, chemistry than their peers. Those classes had the best teachers.

Best kids at math or other sciences had supplementary training, they stayed after hours and learned more advanced concepts often with University teachers.

The school books in secondary schools and high schools weren't authored by educators but by best scientist in their fields. Learning programs were unique and developed also by the best in their fields, not by educators.

Teachers followed very rigorous training in universities, so they were actually skilled in the field they taught.

Everything builds over notions taught in previous years. There's no shortcut, no constant remembering of elementary notions.

Everything was taught with proofs, in a logical manner. There was no "magic". No teacher said "this thing works this way, you have to trust me on this". Instead, all things were proofed and the students had to learn all the "whys" along with the "hows". If you were a high school student and forgot one more advanced integration or derivation formula, there's no problem in deducting it from more basic theory.

One could enroll in a technical Faculty at University only after a series of very difficult exams. Sometimes you had to fight with 30 - 40 others for a place.

Once students reached higher education, the mediocre were weed out, leaving University teacher concetrating on teaching most advanced concepts to the kind of people whou could grasp them and were interested.

Since any kind of education was free, and in many cases state provided free food and housing and many scholarship for many university students and some high school students, the state wanted to otimized their returns.
That meant getting the most highly trained specialists they could for the resources they used in education.

Students were also motivated to learn, because a job as a scientist or engineer was deemed a much better career than working long shifts in cold factories.

To conclude: the communist regime had to compete with the West somehow, and in that competition they had to make learning a very competitive space.

US educational system lives from the money payd by students, or by funding based on the number of students, so on one hand it has to attract more and more students so it earns more money.
US educational system is more and more impacted by ideology, and scientific education is more and more watered down, even at the best universities.[1]

For now, that impact on education is solved by bringing lots of people educated elsewhere. It will probably work this way as long as US has better standard of living.
I think it is not a safe bet to rely in the long term, and since standard of living will constantly improve in other countries, US has to better its scientific and technical education, not worsen it.

[1] https://www.city-journal.org/html/how-identity-politics-harm...