But if you need a self-interested explanation: because you don't want to be competing with people who have artificially-restricted bargaining power and so have to take lower wages. The H1B program as-is, like the old bracero program for farmworkers, is a "compromise" that benefits corporations at the expense of both native-born U.S. citizens and immigrants.
Call it self interest, but I want to live in a society that is functional and with neighbors that are happy. The alternative is to retreat further and further into an affluent bubble. Then, I admit, you don't have to care.
I think it's an error to view concepts such as "community" and "your country" as quaint abstractions while putting full faith in "the product" and "economic viability". Economic arguments are important, but not comprehensive to the human experience. All things being equal, I'd rather live in a decent place with a decent economy, than a terrible place with great economy, or the reverse.
So I am skeptical of arguments that demand economic optimality over all other competing concerns such as culture, "community", happiness, etc. Perhaps economic optimality has diminishing marginal returns?
Where the next huge industry starts, wherever that happens to be, will define the next super power. Having the US be attractive for foreigners to immigrate to and become citizens raises the odds the US will be that place. I don't want access to the Chinese or Indian stock markets, I want the best of their citizens to want to immigrate to the US and start companies here because the US is the best place for company formation (not arguing either way atm, just saying what I want). This type of environment raises all boats.
Instead we teach other countries best, send them home, and yield few of the benefits as they go on to start companies.
Could there be social welfare costs? Rising income inequality? Unemployment of current citizens?
If you want to frame the problem in economic terms, a frank discussion of the risks is mandatory. Right now we usually talk about it like a ca. 2008 banker might have talked about naked credit default swaps. Sure, there might be a risk. But think of how much money we can make!
Those are not your jobs, those are jobs for the take. If you don't like the situation maybe you should consider aligning your interest with the people that is in the same boat with you, not necessarily with the ones who happen to share your nationality.