This is a common misconception. The H1B visa laws are generally used to hire very low wage workers. (I doubt the authors of the legislation are surprised by this result.)
Companies are required to pay a prevailing wage, but this wage can be one of four levels. And of course most H1B applications are for the lowest levels.
Here are levels for software developers in Chicago [1]:
Software Developers, Applications
Chicago-Naperville-Joliet, IL Metropolitan Division
Level 1 Wage:$24.45 hour - $50,856 year
Level 2 Wage:$33.14 hour - $68,931 year
Level 3 Wage:$41.84 hour - $87,027 year
Level 4 Wage:$50.53 hour - $105,102 year
For context the 25th percentile wage in Chicago is $68,670 and average is $88,630.Of course, more ambitious companies may file applications under job titles with even lower wage levels like "system analysts".
You should also know that if a H1B worker is fired, he and his family are out of status that day and must leave the country unless a visitor visa is granted (which is not guaranteed).
How would you like working here if you could be fired and your whole family could be sent packing at will?
If you were an employer, do you think you could you hack this system to your advantage? I'm pretty sure I could.