It all comes back to housing. If you have a desirable place, people want to live there, and at some point if you don't keep up with growth then your city starts to lose the really important people that kept it running (nurses, teachers, police officers, etc).
It's not like SF almost kept up with growth... They didn't try and fell so far behind in a deliberate attempt to keep a status quo, which completely led to the current disaster.