They didn't used to be in San Fran, and they used to support remote work, where cost of living was less of an issue, and lower salaries could stretch a lot further if (for example) an employee was working in the mid west. They had a bunch of strong advantages and an already geographically dispersed workforce and threw it away at a time when they really needed to be getting the most bang for their buck.