See: Tariffs, Mercantilism, Imports.
Even worse when you talk international. An Amazon USA based employee is forbidden from working remotely in India, because of all the legal issues it would cause for Amazon USA.
It's a very complicated issue, in which each individual government is fighting to get a slice of the tax pie. Reference article: https://therealdeal.com/2021/05/07/ny-tax-officials-crack-do...
Anecdotal, but plenty of contacts who would have never accepted an on-site position in UAE, Hong Kong, Germany (for reasons ranging from personal, political, or just sheer affordability), and are now contracting as individuals at companies based in such regions, for substantially above the Bay Area average for their experience.