I agree that it's an apples-to-oranges comparison, but for the record: Manhattan is surrounded on 4 sides by water, and is much hillier than people think (only the southern part of the island is flat). The parts that flat are filled-in salt marsh.
There's a reason the top 8[1] most dense municipalities are in the NYC area: there's limited developable land.
[1]: https://en.wikipedia.org/wiki/List_of_United_States_cities_b...