I worked with H-1B engineers with multiple Fortune 100 companies in Silicon Valley and elsewhere. They were hired for two reasons that had nothing to do with being "qualified":
They were cheap.
They were willing to work 100+ hours a week. (Making them even cheaper.)
The reason they would work such long hours is that they generally were not married, had no children and no social life in the U.S. They had nothing to to but work.
I watched the proliferation of H-1B engineers drive American engineers completely out of entire departments. The companies mostly had peer-rankings of employees. The most productive employees were considered the most valuable.
The American employees with lives and families outside of work couldn't match the sheer number of hours worked by the foreign employees. Even working 70 hours a week, they were unable to work hard enough to match those working 30+ hours more a week. If there were 5 H-1B employees in a group of 10, invariably the engineers unable to put in the sheer number of hours (the American engineers) would be driven out of the group.
The H-1B hires were not hired because there weren't qualified engineers available. They were hired for one reason only - they were cheaper than U.S. engineers.