I've wondered what's different about SF that prevents it from sprouting a late-night restaurant scene to rival NYC and Chicago. Here's what I've come up with:
Earlier last call: 2am, as opposed to 4am in NYC and 4-5am in Chicago. (here's a
full list of last call times across the U.S.)
NYC and Chicago have many more options for getting around: cabs (as in, enough of them that you can hail one on the street) and public transit. You can use either here, but it's more of a pain, so many more people drive and park when they go out.
Both of these things mean you stop drinking much earlier in SF, meaning there's less of a need for late-night restaurants where people can sober up.
On top of that, at least as far as NYC is concerned, smaller apartments combined with high density means that people are used to using public places like restaurants as their "living rooms". If your group is hungry after a night of drinking in NYC, it's just a default that you go to the all-night diner on the corner. In SF, the default is to go back to someone's place and raid the fridge.