That kind of housing goes back at least as far as the Roman insulae, which you can still see in places like Ostia Antica.