Many of the suburbs developed their own economies, which further encouraged people to move there instead of Detroit proper.
Lots of racism played its part in various ways. Lots of room to debate the precise degree, though the debate is probably not helpful at this point.
These days the high taxes (property and income) and auto insurance rates are big problems.
Only a few of these really apply to SF. Though the arrogance of assuming the good times will roll on forever seems accurate.