New York has sprawling suburbs that go into nearby states.
The SF equivalent of a lot of those areas are mountain ranges and oceans. To be sure, SF has suburbs (or suburb equivalents): SV, Oakland, etc. But a lot of prime area for suburbs can't support one.
Draw a 30 miles radius circle from manhattan and SF, and I bet NYC has more livable land.
That said, that is all the more reason for strong development in SF. Or else you are going to end up with SF just being a rich neighborhood for millionaires in a Bay Area megacity.
https://en.m.wikipedia.org/wiki/New_York_metropolitan_area
If you want to work in Manhattan, you need to live near mass transit (bus, train) because 30 miles in/out of the island is too painful. That greatly limits where you can live.