Where would you locate an office for 20,000 people in Northern CA in a city? SF? You'd make housing in the city much worse, and you'd be hard pressed to find the land or permits for it.
Salesforce somehow manages to house 7000 of their employees in San Francisco, and Wells Fargo somehow seats 8000 of theirs. Nobody is suggesting that Google should move all of their people to SF, but I am suggesting they should consolidate into larger offices in the centers of principal cities: San Francisco, San Jose, and Oakland.
I don't think it's viable to encourage companies to do this unless public transport and other services like schools are improved significantly in these cities. San Francisco isn't NYC.