One special social category within medieval society deserves added attention: the monks and nuns. Monks and nuns took vows of poverty, chastity, and obedience when they left their normal lives and joined (respectively) monasteries and convents. They did not, however, have to spend their time attending to the spiritual needs of laypeople (i.e. people outside of the Church), which was the primary function of priests. Instead, they were to devote themselves to prayer and to useful works, activities that were thought to encourage piety and devotion among the monks and nuns, and which often proved to be extremely profitable to the monasteries and convents themselves.
Monasteries and convents grew to become some of the most important economic institutions in medieval Europe, despite their stated intention of housing people whose full-time job was to pray for the souls of Christians everywhere. Monasteries and convents had to be economically self-sustaining, overseeing both agriculture and crafts on their lands. Over time, activities like overseeing agriculture on monastery lands, brewing beer or making wine, or painstakingly copying the manuscripts of books often became a major focus of life in monasteries and convents. In essence, many monasteries and convents became the most dynamic and commercially successful institutions in their home regions. Monks and nuns encouraged innovative new forms of agriculture on their lands, sold products (including textiles and the above-mentioned beer and wine) at a healthy profit, and despite their vows of poverty, successful monasteries and convents became lavishly decorated and luxurious for their inhabitants.
Simultaneously, one way that medieval elites tried to shore up their chances of avoiding eternal damnation was leaving land and wealth in their wills to monasteries and convents. Generations of European elites granted land, in particular, to monasteries and convents during life or as part of their posthumous legacy. The result was the astonishing statistic that monasteries owned a full 20% of the arable land of Western Europe by the late Middle Ages.