Why the houses in Rajasthan have flat roofs?

There is very scanty rainfall in Rajasthan. There are flat roofs so that even if there is some rainfall, the water can be collected in the roof.