> Meanwhile, the cost to the city in terms of infrastructure (pipes, roads, drainage, etc) is much lower than the houses in the subdivision down the road
The costs in terms of lots of services that aren't physical infrastructure scales with population, though, and for some services (or for adverse impacts that services don't fully mitigate) is also higher, rather than lower, for the same population when density is higher; e.g., crime rates per capita tend to go up with population density.