San Francisco seems an odd choice for Starfleet Headquarters to me, especially within sight of the Golden Gate Bridge. It's such a densely populated area, I would figure that it's one of the last places one would want to place a new military facility - especially one which surely must be kept at the forefront of technological innovation.
If anywhere in the U.S., I'd more likely have expected Starfleet's home to be closer to an existing NASA facility that is more intimately involved in spaceflight operations. The obvious choices would have been Kennedy Space Center in Florida, or Johnson Space Center in Texas. The closest facility to San Francisco would be Ames Research Center in Mountain View, which doesn't quite compare to the other centers from the layman's perspective.
The next spot I could think of is Bozeman, Montana - site of Zephram Cochrane's flight of the Phoenix. But that's half-way across the continent.
Has there ever been an explanation in canon, production notes, or interviews, that explains why they chose San Francisco to be the home of Starfleet?