Most buildings in biblical times had flat roofs. With the hot climate, they had a wider range of uses than merely providing shelter for the building.
Uses of roofs
In cities, some roofs were open, public places
Roofs were usually constructed with a thick layer of clay
Roof as a synonym for house