Wealth != municipal revenue. Menlo Park was particularly upset that Sun Microsystems (selling hardware and generating sales tax) was replaced by Facebook (no sales tax revenues). A pizza parlor would generate more revenue for the city, seems like, than an Internet company.
The only other venue is for company employees to buy up residential real estate, start paying property taxes and show up for city council meetings, as the city is likely deriving significant revenue from that. But if that is not happening, we can assume that company employees chose to deploy their residential spending elsewhere, and if so, why should the city care?
I tried to find an exact answer, but San Mateo county doesn't publish a list of largest property taxpayers (some do http://ttc.ocgov.com/proptax/toptaxpayers so I believe it's public records), and a search for variants of Hacker Way on their site doesn't yield much.
The problem is fractal. The reason why the companies locate in SF rather than, say, Gilroy is the same reason why the companies locate in Silicon Valley rather than Tulsa, OK, for example.
The first problem here is that the executives in these companies want to live in those rich communities, so they don't locate the headquarters somewhere sensible. And lack of telecommuting is driven by the fact that executives can't telecommute as everybody now realizes that they actually don't do anything.
Second, there is a recruiting advantage when your company office is in the "cool" area. If you put the Facebook HQ in Gilroy, for example, a bunch of the younger folks would choose to work for a company that is located in SF proper.
The executives don't live where the problems are. And, in fact, the executives are quite happy with NIMBY keeping the rabble out of Atherton and Palo Alto, thank you very much.
The HQ location is a balance between where the executives live and where employees can be recruited. With more tilt toward the executives (there was a study somewhere that showed that HQ relocations almost always moved closer to the CEO's residence--funny that...)
It is absolutely insane that there is so much wealth being generated by these companies, yet they seemingly have no political will to influence the very localities they are based in, never mind their federal adventures into H1-B skullduggery and patent power-plays.
And the local communities themselves need to accept that tech is a huge tax base and the reason for their affluence, and stop their rampant NIMBYism and obstruction to urban progress.
Note: I'm referring more to past actions by wealthy communities in Santa Clara and San Mateo counties who did things such as impede the growth of BART. Or when rich liberals in San Francisco decry housing construction by citing a fear of "losing the character of the city." Gentrification of indigent areas such as East Palo Alto, the Mission, and so on is another story.