They are doing that now too, however the problem is that h1b is used for roles outside of tech, believe it or not, and if you measure everything by Bay Area tech salaries a bunch of necessary but lower paying jobs will go unfilled
They can pay more, or hire American.
If it's truly necessary, the fact that it's unfilled would be directly related to it being low paid.
And if the employer isn't willing to pay the cost of labor to fill the position, it directly raises the question of whether its "necessary".