What was one function of the great cathedrals during the Middle Ages?

help people endure the Middle Ages
provide the rich people with education
serve as a symbol of authority
provide a sanctuary for the priests