So you do bring up a very common line of thinking (and, I think, a common one that isn't expressed often in such topics).
Firstly, you seem to be conflating H1-B with obtaining a foreign contractor. That's an accounting burden, often comes with time zone issues, and does damage to a company's return-to-office agenda unless they are hired for something completely divorced from other teams. This puts the contractor in a considerable position as they can maneuver with effectively zero oversight. Great for the contractor, bad for the employer (at least the first time; after a rapport is established it could be fine).
If that's not what you meant, then the engineer(s) being hired are from a staffing agency or similar. But now you are at the behest of who the staffing agency pulls for local talent and their ability to retain said talent. Often, while incoming engineers can be vetted the employer doesn't have the latitude of choosing any engineer from the region and plucking them like they would s contractor or H1-B.
An H1-B gives the employer the best of all worlds at the cost of sponsorship. The employee works for them and has considerably less options as many companies do not sponsor H1-B visas, so they have less opportunities. Between the value of the US dollar and engineers being salaried much lower elsewhere you could likely pull an H1-B for half the price of a US engineer and in many cases they would still come out very well ahead. As well, by bringing them to the US you fix any time zone issues and RTO questions.
FWIW, I think a lot of US engineers tend to have a negative view on both being in-office AND having compensation reduced; I think most would be fine with a reduction in comp if it meant remote work - but most companies seem much more interested in maximum control AND minimal investment.