I would rather a house, and they were started because of transportation. When people began to congregate in cities, to be close to the new jobs offered by the Industrial Revolution, the only form of transport was by horse. To avoid having to travel for several hours to get to work, people moved into the nearest available space. Since space was at a premium, the available spaces were small and relatively inexpensive. Voila! Apartments!