The idea of the walls of monastery was to keep everybody else out because you wanted to develop a certain type of life. Most people in the world had different ideas on the subject.