The Native Americans in the American West and Southwest had to struggle with special climatic conditions. The climate was semi-arid and only just suitable for growing corn. The year-round supply of drinking water was difficult. It was very hot during the day and very cold at night.
But life there had its advantages as well. One was quite undisturbed, there were hardly any neighbors or predators. If one had a shelter for the night and shade for the day, it was pleasantly warm. In other words, a sedentary way of life with agriculture was essential for the successful settlement of the area.
This culture was probably very peaceful, well adapted to the climate and able to carry out larger building projects, i.e. well organized. Actually, there were three tribes living in the area of Utah, Arizona, New Mexico and Colorado, the Ancestral Pueblo (Anasazi) in the north, the Hohokam in the west and the Mogollon in the south all the way to Mexico. All three disappeared after a few centuries more or less without a trace, forced by a small climate change that changed their habitat from inhabitable to uninhabitable.
The legacies are many ruins of adobe (mud brick) buildings, best preserved are those built on rock walls or in half-caves. To call them cave dwellers is nevertheless wrong, they just used the available possibilities. And by the better preservation of the Cliff Dwellings, one gets the impression that they always built in caves. The term castle in some proper names should also not be overrated, they are not castles. They certainly offered protection against animals or disgruntled neighbors, but were far away from military installations. The name is rather an expression of the prejudices of western explorers.