The core of san francisco, probably 30% of the city's 49 sq mile landmass, and where 60%+ of the population lives, was built before cars existed. Most of SF was a walking/horse city, and then a walking/streetcar/cablecar city.
True, alongside downtown Berkeley, Oakland, and Palo Alto (maybe a few others)
Nonetheless, mass transit in SF is still pretty crappy. Muni is notoriously unreliable and slow (it's often faster to jog than take Muni -- to say nothing of biking).
As someone who lived in Palo Alto for almost a year without a car... there is so much to be desired for public transit. Outside of the few blocks near University, it quickly becomes a walking wasteland. My bike, on the other-hand, was a divine gift from the heaven and, when combined with CalTrain, enabled a fairly large world-bubble.