Historically, different monasteries had different purposes. Some of them were producing hand-written books and other products - in other work, they were work places with the difference that the workers were dedicated for life. Some were protecting the church's riches. Some other monasteries were places families could place their daughters if they didn't want her to marry anyone, such as if she'd had an extramarital child: this would return the honor to the family.