From Ivan Illich’s Deschooling Society:

The teacher-as-custodian acts as a master of ceremonies, who guides his pupils through a drawn-out labyrinthine ritual. He arbitrates the observance of rules and administers the intricate rubrics of initiation to life. At his best, he sets the stage for the acquisition of some skill as schoolmasters always have. Without illusions of producing any profound learning, he drills his pupils in some basic routines.

The teacher-as-moralist substitutes for parents, God, or the state. He indoctrinates the pupil about what is right or wrong, not only in school buy also in society at large. He stands in loco parentis for each one and thus ensures that all feel themselves children of the same state.

Children are protected by neither the First nor the Fifth Amendment when they stand before that secular priest, the teacher. The child must confront a man who wears an invisible triple crown, like the papal tiara, the symbol of triple authority combined in one person. For the child, the teacher pontificates as pastor, prophet and priest–he is at once guide, teacher, and administrator of a sacred ritual. He combines the claims of medieval popes in a society constituted under the guarantee these claims shall never be exercised together by one established and obligatory institution–church or state.

Classroom attendance removes children from the everyday world of Western culture and plunges them into an environment for more primitive, magical and deadly serious. School could not create such an enclave within which the rules of ordinary reality are suspended, unless it physically incarcerated the young on sacred territory. The attendance rule makes it possible for the schoolroom to serve as a magic womb, from which the child is delivered periodically at the schoolday’s and school year’s completion until he is finally expelled into adult life.

The school system today performs the threefold function common to powerful churches throughout history. It is simultaneously the repository of society’s myth, the institutionalization of the myth’s contradictions, and the locus of the ritual which reproduces and veils the disparities between myth and reality. Today the school system, and especially the university, provides ample opportunity for criticism of the myth and for rebellion against institutional perversions. But the ritual which demands tolerance of the fundamental contradictions between myth and institution still goes unchallenged, for neither ideological criticism nor social action can bring about a new society. Only disenchantment with and detachment from the central societal ritual and reform of that ritual can bring about social change.

The American university has become the final stage of the most all-encompassing initiation rite the world has ever known. No society in history has been able to survive without ritual or myth, but ours is the first which has needed such a dull, protracted, destructive, and expensive initiation ritual in the name of education. We cannot begin a reform of education unless we first understand that neither individual learning nor social equality can be enhanced by the ritual of schooling.

School seems eminently suited to be the World Church of our decaying culture. No institution could better veil from its participants the deep discrepancy between social principles and social reality in today’s world.

I’m not sure I fully endorse these paragraphs, but the school-church comparison is interesting. In Average Is Over, Tyler Cowen also points out the parallels between educational and religious institutions:

Of course, educational institutions aren’t ready to admit how much they share with churches. These temples of secularism don’t want to admit they are about simple tasks such as motivating the slugs or acculturating people into the work habits and sociological expectations of the so-called educated class.

We like to pretend our instructors teach as well as chess computers, but too often they don’t come close to that ideal. They are something far less noble, something that we are afraid to call by its real name, something quite ordinary: They are a mix of exemplars and nags and missionaries, packaged with a marketing model that stressed their nobility and a financial model that pays them pretty well and surrounds them with administrators.

Neil Postman also identified a connection beween religion and education.

Finally, Peter Thiel is also fond of the analogy. He often compares the state of the education system today to the state of the Catholic Church 500 years ago: