These trees, with their nasty thorns, appear to be an essential part of survival in this part of the world. They were referred to a Mimosa, but are probably Prosopis cineraria. Purdue University's Horticulture Department talks about how this plant saved many people from famine in 1988 and 1939.
It is used for food (a couple of times we had a local dish called Kher Sangri which is made from the pods), for animal fodder, and for firewood. During the winter season that we were there, the trees were frequently stripped back so that only the trunk and a few branches at the top remained, presumably to generate new growth when the weather warms and the rains come.
I became acutely aware of things like this during my trip, as one of my constant companions was Jared Diamond's recent book Collapse.