Many companies can't hire people in 'any' location due to how their legal entities are setup in different countries, how many of them they may or may not have and possible complications with tax etc.
Once you get past that basic hurdle, you might find that the company is willing to pay more because they want a given skilled worker to be co-located with the team they will be joining to increase productivity which might come at a higher price than hiring into a different location but potentially trading off worker and/or team efficiency.
> you might find that the company is willing to pay more because they want a given skilled worker to be co-located with the team
That's making a big assumption — that the team is in an HCOL area, such that "colocated with the team" is synoymous to "costs more."
There are a lot of companies who are headquartered in LCOL areas of the world; but still do location-adjusted pay, such that they might be paying someone working remotely from an HCOL area more than they pay the local team.
Once you get past that basic hurdle, you might find that the company is willing to pay more because they want a given skilled worker to be co-located with the team they will be joining to increase productivity which might come at a higher price than hiring into a different location but potentially trading off worker and/or team efficiency.