City-to-city comparisons suffer from all sorts of problems, not the least of which is that cities are defined according to their own historical, arbitrary borders that are practically meaningless when talking about actual issues.
Consider that NYC covers 302.6 sq/mi to SF's 46.69, which means that NYC isn't merely double the density, it's double the density over a much, much larger area.
This is why most serious comparisons are conducted at the level of the MSA (which would fold every one of the cities you're putting ahead of SF in density into a larger metro). Often, when laypeople compare cities, they're thinking about the MSA while quoting numbers they've found for cities-proper. That's why nobody in this conversation is thinking about Guttenberg, NY (and why mentioning it is almost a non sequitur).
I totally agree with you re: meaningless comparisons. However, I think the MSA comparison is pretty flawed as well.
For example, the Los Angeles metro area has a higher density than both NYC's and SF's (which is higher than NYC's), but it's obvious – to me at least – that in reality, considering only areas that most people would agree are remotely close to being in/near "the city," the density order of these three would be more like: 1) NYC 2) SF 3) LA.
But yeah, at the end of the day, I'm mostly being pedantic :)
Now guess which ones are central cities in their respective MSAs. Excluding those, guess which ones aren't part of the NYC or LA areas. Let's do ourselves a favor and exclude Poplar Hills, Kentucky (362). There's one city left, it's part of the Boston area (which is the next densest large city after SF), and you guessed it, Somerville has a subway with a separate light rail extension under construction. The only outlier is Sunny Isles Beach, FL (20,832), in the Miami area. And Miami? It's just after Philly, all known dense cities.
So yea, it's NYC, then SF, minus a couple pockets of LA. And these are all dense places that need subways. It takes a special sort of something to claim, as the top comment did, that SF is not dense enough to warrant a subway, let alone massive large-scale investment in all modes of mass transit as NYC has.
This isn't even close to being true.
It's likely only true if you only count cities with populations over a certain amount. Please see my other comment: https://news.ycombinator.com/item?id=12754395