These caves  are formed by the heavy infrequent rains of the desert. The process is called Fluvial erosion.