Nowhere is as safe as we'd like, as we're all aware, but I agree that it does seem foolish to have rebuilt San Francisco when there was a vast territory with many safer areas for a city. But then, perhaps people didn't know that future catastrophic quakes were more likely than not there. We know so much more today about the conditions that result in more severe earthquakes in some places than others.
Quite the opposite; there had been a major quake in the Bay area 40 years before the '06 quake, and the area was known to be prone to quakes (a good read on the '06 quake is "A Crack in the Edge of the World" by Simon Winchester). But as usual (see: global warming debate of the late 20th/early 21st century), economic interests prevailed.
Hmmm...that does make sense; I stand corrected. It's been years since I read anything on the '06 San Francisco quake and then it was from a historical and sociological standpoint. Obviously, I was speaking out the wrong orifice. ;-)
I suspect that "This is home" was also a powerful factor for many people desiring to rebuild. A feeling of home overcomes more sensible considerations oftentimes in such circumstances.