Ancient monasteries were protected by a wall in an enclosed community. They provided a node of economic development, because monasteries provided a certain kind of order and at least in the beginning monasteries were set up as kind of agricultural commune.
The monks were supposed to work in the field and be self-sufficient with their labour. This was one of the few forms of larger social organization that were left in the collapse of the Empire and while the area where St. Catherine’s was built in in Egypt was not affected immediately by barbarian tribes, these kinds of monasteries all over the Empire, in the former Empire.
This helped the economy going because groups of monks would work. They were very efficient, and they would not spend a lot of money. Because they were supposed to live frugally. They developed a surplus of money. And then they would be able to hire people eventually and create employment and become a source of income for the surrounding areas, and a source of order and of course in some ways of spiritual leadership.