It may seem odd to people who grew up in the single-family detached housing world of the postwar US,
but there are cultures and societies around the world even today where multi-family housing is common.
See for example Casas de Vecindad,
a typical form of housing in the US/Mexico borderlands for hundreds of years.