This canard keeps getting repeated in HN threads. This is WRONG. 100% absolutely completely WRONG. The only stated purpose of the H-1B program is to allow foreigners with degrees (or equivalent experience) to perform skilled work in the US. Here are the DOL requirements: https://webapps.dol.gov/elaws/elg/h1b.htm
The only one that affects US workers is to "[p]rovide working conditions for H-1B, H-1B1, or E-3 workers that will not adversely affect the working conditions of workers similarly employed." (There are additional requirements on H-1B dependent companies, but those don't apply to most companies.)
Here's a fact sheet from the DOL specifically about this matter: https://www.dol.gov/whd/regs/compliance/FactSheet62/whdfs62O...
What you're talking about is requirements for an EB-2 or EB-3 green card.