Look at it this way. Except at the tippy top, employers aren’t looking to hire “the best.” They decide what the role is worth, and then select from the pool of people willing to work for that level of pay. A de facto path to U.S. citizenship for someone and their kids is basically a form of non-cash compensation for H1Bs. So even if the cash pay is the same, the foreigner worker is getting more value than the American worker. The effect is the same as if the government kicked in an extra $50,000 a year (or whatever) to the paycheck of foreign workers but not American workers. So if the role pays $100,000, it will draw a pool of foreign workers as if it pays $150,000 a year. So, at every level of job, the American worker is competing with more qualified and motivated foreign workers, because the job simply is worth more to those workers.
For a long time, I faulted Americans who didn’t teach their kids to “learn to work 16 hours a day” like my dad taught me. But I have kids of my own now, and they don’t have the mentality of someone who is a generation away from having to take a boat to school during monsoon season. And that’s probably a good thing that we should want as a society.