US science benefited from a huge influx of European scientists and then sustained itself with large scale grants motivated by the cold war.
The US doesn't have great academic freedom but reasonable academic freedom compared to many places and US achievement is the gold standard for many things in many places so a lot of the best people come here and indeed, sacrifice to be here even as lots of money flows into universities - allowing that money to be effective even when some portion flows into pork also.
It's paradoxical which allows things to seem "better than ever" and "worse than ever" simultaneously.
In some countries, you have to choose between a trade school track and a college track around the time you enter high school and there is little to no opportunity to change tracks at a later date.