In many places, empty land is hard to find, and it costs a lot. In big cities, builders get around that problem by building up instead of out.
People on the top floors get a great view of the city, just by looking out the window.
In less modern places, people have found creative places for homes. In Southeast Asia and other tropical areas, many houses are near water. They sit on stilts, which keep them safe during floods.