They are rewarded for cutting the budget, and undercutting domestic workers. Until that changes, this problem will continue. Or workers could unionize.
As with many systemic issues in the U.S., it boils down to "publicly traded company must have highest profit possible so line on chart goes up". As much as I dislike FAANG companies in general for all their anti-worker efforts, I can't honestly blame them for making decisions that look good on the balance sheet. If I am a company, and I can choose to hire 10 U.S. engineers for $200k a pop, or 10 H-1B engineers for $100k a pop, I'm going to pick the H-1B engineers. Every H-1B or green card engineer I've worked with in-office has been extremely skilled, so I wouldn't even feel like I was "getting what I paid for" hiring them over U.S. citizens.
You mudt have gotten lucky with your coworkers. Ive worked with people who claimed to be “experts” in a domain that didnt have basic skills. I would say 5% were excellent, 5% good. 90% worthless. Coupled with weird insular cultural dynamics, poor english and communication skills, poor throw it over the wall mentality. Its overalll a huge net negative for a company. Perhaps its different in FAANG. But in enterprise companies its very bad.
As time goes on I'm finding AWS on a resume less and less impressive, regardless of citizenship status. Lots of resumes where they were at AWS for 1 or 2 years, I guess they got stack-ranked out. It makes sense. Everyone knows AWS is a revolving door.
I heard the average tenure for an SDE at amazon is something like 9 months. The culture is so repulsive that if you're good you leave soon and convert that big name on your CV to something better. I know a few really good ex AWS engineers and the thing in common is they hate Amazon and will rant about how dumb the culture is.
If there is a correlation to company size or company popularity (e.g., FAANG) I would have actually thought it would be large companies/FAANG are hiring the low-quality H-1Bs. I usually work at medium sized companies (50-200 engineers company-wide is my definition) where maybe 2-4% of the engineers are H-1B or green card. They've all been great. Even the one at Allstate (Allstate was also hugely reliant on India-based Infosys "developers" who I will yell from the mountaintops were straight garbage and very much net-negative).
And that's exactly why managers keep hiring them. If you're a defensive manager who just wants to keep your head down and grind out the years before moving getting a "senior" or "principal" manager job somewhere else then a bunch of compliant workers who'll punt anything messy onto some other team is exactly what you want.
I've heard anecdotally that Stryker is really bad about this (throw it over the wall mentality) and I remember thinking when I heard that, how the fuck are employees of a company getting away with being assigned work and just reassigning it to someone else? But then I think about my Allstate days and I can see it. I think you're being downvoted because people reading your comment haven't witnessed that sort of dysfunction in a company, but to anyone reading this- it is how some companies operate. The execs at these companies will deadass hire garbage people (usually offshore) and then brag about how much money they saved the company vs hiring U.S. citizens. Either the bill comes due years down the road when prod goes down due to a bullshit bug from the offshore team and it ends up costing the company millions, or U.S. employees are picking up the slack.
At Allstate (circa 2016), we were required to use offshore teams from Infosys. There was one U.S. software engineer for every 6 or so offshore "engineers". We weren't allowed to say "no they actually cause more problems than they fix, you can keep paying them but we'll be paying them to do nothing". Ha. You would have gotten fired for that level of "insubordination" because the higher ups legitimately didn't understand that software development is a skill - it's not like an assembly line where anyone can put an item into a box over and over again.