This is a water channel cut horizontally from the right, then vertically, then horizontally again, into the rock. I remember seeing this kind of water transport system in Petra as well.
According to Lonely Planet: “The Nabataeans were masters of hydrology and manipulated rain run-off and underground aquifers to thrive in this desert landscape. This great well was one of more than 60 wells currently known in the city. The wall supports – added in the 20th century – were built from railway sleepers pilfered from the Hejaz Railway.”
Below is the well referred to in the Lonely Planet quote: