The built form has absolutely nothing to do with good neighborly ties, community camaraderie, etc.
This one of the most persistent Canadian myths, along with the "kids need a backyard to be raised properly."
The number one factor, as always, is people giving a sh*t. Without that, everything falls apart.
Come on, how much community bonding is there in the typical post war suburban subdivision? Little to none and in fact people move to these areas to have more distance from neighbors.
When I used to rent, my building saw an influx of newly arrived Filipino folks. They were very communal with each other. Didn't matter that they lived in a large apartment building.