Several hundred years ago, large buildings were all about protection. Castles and churches provided protection against the weapons of the time: spears, arrows, swords, and other hand-to-hand combat weapons. This era ended because of the development of gunpowder, and these structures could no longer effectively provide protection.
Social changes followed as the development of weapons using gunpowder started the industrial revolution. Large numbers of workers in the cities led to the development of buildings for housing. The high concentration of people in close proximity to each other created major infrastructure problems that we are still working at correcting today.