Don't forget that a "job" is not a good thing. It's a bad thing. People don't like working, they mostly want money, at least for menial jobs. The whole idea of silicon valley is to take people's menial jobs. That's what it's there for! Should the government hinder technology companies because they're threatening to replace people's jobs with computers? Of course not! In the case of both technology and cheaper foreign workers, the overall result is positive to the US economy.
If you think Americans are more deserving than other people, then, well that's just the nationalism and racism that the GP described. You can pretend it's not racism, but it's effectively the same thing - treating people worse because of who their parents are.