Building isn't the main difference between SF and NY. If everyone in Brooklyn want to live in Manhattan prices would be very different.
If anything SF has become more centralized and companies keep paying high salaries and other perks playing in to the whole thing.