There's a slight of hand going on here, where you at first assume all employees are fungible, to mention it's not possible for some firms to pay all employees the same.
But then you ignore that, before someone is hired, when they're merely a potential-hire, they _are_ (basically) fungible with all the other potential-hires. If you can afford the most expensive one, you can afford the cheaper one.
No one suggested paying everyone the same huge amount. But if you are paying Huge Amount X, that can go anywhere.
In equilibrium, you'd expect someone's programming skillset not to massively drop in value because they moved slightly far away in essentially the same legal jurisdiction. Until we reach that equilibrium, there is money waiting to be collected by firms who hire American engineers to work remotely.
Also it is not that devs in SF are especially good; I would guess that the distribution of skill is power law (specifically the number of devs in the global n-th percentile as a function of the total number of devs in the hiring pool) and it might be argued that the competitions is counterbalancing any positive effect of that.
In the end it is a position of which job market do you want to be in.
That’s not really true. There are companies with a few employees in expensive locations and many in low income regions. If you switched everyone to the same salary you’d bankrupt the company. I certain don’t assume to know what Gitlab’s financials look like.
What if a company is paying above market rates for all their employees in their chosen locations? As a thought experiment, assume each of those people was the most suitable employee in their field. You’d pay them what they wanted in order to make it work. What if one of those people had a special situation with say dependants? Would you pay them a little more to relive that so they could work for you effectively?