You can fill any job without H-1B if you put in enough money (you may need a bit too much though).
The bigger the shortage, the bigger the spread of salary between americans and foreigners salaries. So, if a company doesn't get the visa it will pay the spread, or worse, it will produce less.
Minimizing the total loss of the companies under a constraint of total number of visas is a very simple problem mathematically speaking: by selling H1B visas to the highest bidders.
Plus, it means that these companies are compensating society for bringing more job competition.
The bigger the shortage, the bigger the spread of salary between americans and foreigners salaries. So, if a company doesn't get the visa it will pay the spread, or worse, it will produce less.
Minimizing the total loss of the companies under a constraint of total number of visas is a very simple problem mathematically speaking: by selling H1B visas to the highest bidders.
Plus, it means that these companies are compensating society for bringing more job competition.