Because farming in a desert means you have as much sun as you could want, and can (with the aid of groundwater and water transport infrastructure) add as much water as you need, when you need it, and at no other times (harvest etc).