A more positive-sum view is that the US is bringing the rest of the world up in science every time it exports a PhD.
While indeed a positive outlook, I think alot of Americans are beginning to wonder what the benefit will be to them. The isolationist and xenophobic rhetoric of recent years is mostly a reaction to a growing sense that increasingly few Americans are benefiting from global goodwill and development. While I dont agree with the sentiment, its not entirely incorrect to describe such relationships are parasitic more then…
"they" as in the USA or its people?
Germany has taxpayer-subsidized education even for foreign students. They may stay, the may leave. One of its views is that the time the student spent in the country helps foster cultural ties and understanding, and generates goodwill towards the country...
I suppose "goodwill" is hard to translate to cold hard cash, so America doesn't really like it ;-)