Why were many medieval monasteries wealthy?

They received royal gifts of land and serfs.
They earned income from the sale of products such as wine.
They profited from buying the land of bankrupt nobles.
They received gifts by people seeking salvation.