Sort:  

I don't know about the ones on the photo (Todra Gorge), but the couchsurfing host I stayed with in Dades Valley said that his grandfather used to live in the mud houses that were built close to the river and the fields, but sometimes they would flood. When a road was built and later running water was installed, everyone moved to new houses further from the water.
The houses in Aid Ben Haddou are actually still inhabited, despite the lack of modern comforts!

Thanks for the extra information @jpphotography. It looks like a really interesting place to visit. I enjoyed your post very much! 😊