That makes intuitive sense. But in practice I'd argue it's much more nuanced than that. What we all legally and sovereignly call "The United States of America" are many distinct (and I don't just mean by State borders) populations with vastly different needs and are affected differently by global undertakings.
As a thought experiments, let's say bringing immigrants from Country Z lowers the wages of workers in Trade X in Alaska-America by 50%. However, this decreases the amount of production for Product H in Country Z by 25% due to migrating workers. This increases the wages of workers in Trade B in Florida-America by 200% due to the shortage of Product H. The net-gain here is Zero for The United States of America (assuming workers in Trade B and X are same in numbers, thereby cancelling each other's net loss/gains out).
Ought not the American government allow the immigrants on the basis that, overall, it is increasing the wealth of the world economy; the world of which the United States of America is very much a part of?
I suppose the argument can be made that fundamentally the government only cares about its own Prosperity even in this case, and that a "rising tide lifts all boats" scenario outlined above merely falls into that category.