The population density of residential areas depends on multiple reasons that can be broadly classified into Human factors and Physical factors.
Human factors are Political, social, and economic in nature and Physical factors are the shape and height of land, resources, and climate.