Rent rises with the productivity of locations, and density makes locations more productive in the aggregate. Agglomeration is the economic term for why that is.
It may seem paradoxical to you, but supply and demand simply doesn't function the same way when it comes to land. The supply of land is fixed. That is why rents are more like monopoly pricing.