That's a vast generalization. Although cost is part of it the other side of hiring STEM graduates to do rote "Enterprise" work has its own tall challenges. You either get intelligent people that hate the job and move on or you get normal people that take time to learn, insist on doing limited things and are generally not very motivated to produce work that is vastly above the quality that you get from hiring the alternatives.
So for the managers who have to deliver working things to their clients, hiring H1B saves money and generally due to their predicament these people are more willing and flexible to work beyond their assigned loads to cover up any knowledge deficiency. From the manager's perspective it works out better.
Oh and no one cares if your code is top quality (whatever that means) - if it is reasonable quality and if it works it's all good. And that's because not many non-H1B written products they have seen are all free of problems - so why pay more for something that works equally well as the one you can pay less for?
That's basically the reality of it. The rock star US born, US educated SV programmer myth only applies to a limited section of the programmer populace - rest of us all are normal people who can get it to work reasonably well.
Hiring the cheapest programmers available generally doesn't work out well, especially if they are cheap and experienced.
Holding your nose up high and refusing to work for the prevailing wage generally doesn't work well, get a job, do something awesome for low pay, leverage that into something that pays well.
While most people were paying thousands of dollars a year going to school I was getting paid to learn tech working a shitty tech support job. While most of my colleagues were graduating, I was buying my first house at 22. (Yes, as tech support pay grade, no startup millions). Before tech support I was working at a warehouse stacking boxes and doing other day labour.
Don't complain about H1Bs work harder, faster, and smarter than them. An H1B is no different than any other motivated competitor.
Try this, ask for a pen and a piece of paper, write your resignation letter, sign it, hand it back to them, and walk out the door.
9 times out of 10 you won't get to the door, half the time you'll have a pay raise by the time you get back to the office.
You're a huge valuable asset that the company has invested lots of money in that knows how things work. They want to shave pennies not lose investments. Act accordingly.
So for the managers who have to deliver working things to their clients, hiring H1B saves money and generally due to their predicament these people are more willing and flexible to work beyond their assigned loads to cover up any knowledge deficiency. From the manager's perspective it works out better.
Oh and no one cares if your code is top quality (whatever that means) - if it is reasonable quality and if it works it's all good. And that's because not many non-H1B written products they have seen are all free of problems - so why pay more for something that works equally well as the one you can pay less for?
That's basically the reality of it. The rock star US born, US educated SV programmer myth only applies to a limited section of the programmer populace - rest of us all are normal people who can get it to work reasonably well.