OTOH, location matters a lot. Otherwise your company wouldn't be in the Bay Area. Centers of gravity are a thing. Why not pay for location? Even if an employee is remote only, if they network well where they are, it's worth paying for location.
Given a group of 7 people (posit some great team) their output is the same irrespective of location, sure -- but how did you get those 7 people? If you were in rural USA, your probability of ever having arrived at that situation is already much lower.
If location truly didn't matter, then you'd be able to move your SF team to Iowa and save a lot of money, but that's not going to work.
Or it matters very little for most things and companies choose the Bay Area for shared reasons: preferences of independently wealthy executives, signalling of some sort, etc.
The reason these high cost of living places exist is because they are in high demand due to all the benefits. Someone living in North Dakota (sorry anyone who is, I'm sure it is great!) won't have all the culture, food, weather, entertainment, night life, etc of someone living in the bay area.
A "Do the Right Thing" would be to truly embrace "remote-first" and realize you are paying someone for the work they do, not where they live. We are paying $x for job y and what you do with the value you bring to the company is up to you: live some place nice or some place cheap.
Our company is 100% remote (most live in bay area anyways) and we don't have pay scales by area.