Monasteries are places where people come who are devoted to prayer. Buddhists in southern Asia originally went on retreats each year. But with the rainy season at that time of the year, they started to stay together for safety. Christian monks at first would go live solitary lives as hermits. They then started living near each other for safety and to help each other. This led to monasteries where they would live with each other. The first monasteries were built by Celts in Britain and the surrounding area, and were placed on isolated islands were they could live out their lives in prayer and isolated from the rest of the world. Later, some were built in 529 AD in the Benedictine era, as St. Benedict envisioned a place where people could come to learn and devote their lives to God, away from the rest of the world. This would mean giving up marriage and children, as they were but distractions from the holiness and peace that came with God.
While living in a monastery, monks would rely completely on each other and the materials there, as they wouldn’t go outside of the monastery borders. However, usually they would allow people to come inside the monastery for prayer and healing. They would cook their own food, build and sculpt their own furniture, and provide their own entertainment. Different religions and different monasteries would impose different rules on their groups. Some monks were not allowed to have butter on their bread, unless it was a special occasion such as Christmas. Some were never allowed to eat the meat of a four legged animal. Monasteries also acted as a number of things, including inns, hospitals, and schools. Often they were the closest place for miles where you could get treated for disease and illness. Pilgrims and travelers had the option of spending time at the monastery on their journey.
Monasteries and monastery life has waned in modern times. There are still some large groups in Buddhist communities. The value of large groups has been disputed by some, though. There is a trend now for smaller groups, which come together for Sunday worship or in time of need.