Usually the salaries are based on "market rates" and explicitly do not consider cost of living.
This is why London jobs are not paid more than SF - the "market rate" in London is lower despite living costs being the same or more than SF (especially when in London none of the FAANGs offer free transport to and from work and property prices are so much higher near transport hubs).
Market rates are murky - I guess it is based on competition and who employs in the area. There is some sort of shared database that loads of companies use from what I understand, but they are flawed since they don't include a lot of high-paying employers in finance et al.
This is why London jobs are not paid more than SF - the "market rate" in London is lower despite living costs being the same or more than SF (especially when in London none of the FAANGs offer free transport to and from work and property prices are so much higher near transport hubs).
Market rates are murky - I guess it is based on competition and who employs in the area. There is some sort of shared database that loads of companies use from what I understand, but they are flawed since they don't include a lot of high-paying employers in finance et al.