Christian monasticism is a development of the eremitical (hermit-like) practice of some of the prophets (Elijah and John the Baptist are two good examples) and of Christ himself, during his 40 days in the desert. Hermits first built cells or huts (or moved into caves) to live in in the desert, then they started living in community (for safety, among other reasons).
In fact, the Carmelites consider Elijah to be their founder, and take their name from Mt. Carmel in the Holy Land.
Elijah founded it? Interesting.
As a child, I was so disappointed when we went to the Carmel mission, founded by Junipero Serra, in Carmel, California. There was no candy. None.