Monastery and cathedral schools trained churchmen. The earliest monastery schools I know of are ca. 800 AD in the Carolingian empire. The main purpose was to teach Latin through memorising (singing by rote) first the Psalms and then Latin hymns. Once the novices had this basis they could take part in the liturgy. Later training was based on the seven liberal arts, all of which equipped students to be effective monks/clerics (eg arithmetic and astronomy were important for calculating the date of Easter). These schools provided a focused vocational training.
Secular schools developed in urban centres in the 15th century. European grammar schools (Lateinschule in Germany) came from the desire of urban merchants to prepare their sons for the professions (law, medicine etc) without necessarily tying them into a career in the church. To enter such professions, the boys were expected to know the sorts of things that the products of cathedral and monastic schools knew, concentrating on the acquisition of Latin. Such families were unlikely to be able to afford individual tutors. They set up charter schools to spread the cost of educating their children.
Schools were often set up by urban guilds as a perk for the sons of their members; some still survive in England (eg Merchant Taylors; Haberdashers; Christs Hospital -
still run by the Almoners' Guild...)
So even at this stage, schools had moved beyond providing a vocational training to providing an arbitrary passport (Latinity) to the desired profession. IMO, this peacock’s tail is still the primary function of schools – they rarely supply the information or offer the training that people want; instead, the qualifications are interpreted by employers or universities or whoever as indicating a certain level of staying power and determination to proceed to whatever goal it is that the person has in mind.
It is quite possible for a person to spend many years (not just finishing high school or a Bachelor’s degree, but a Masters as well) chasing the peacock’s tail which will supposedly finally allow one to start learning how to do what one actually wants to do.
The most valuable areas of training preserve their vocational aspects – music, dance, art, sports… – and mostly people pursue these areas outside schools through: private tuition with an expert; self-directed practice and study; joining a club/team/orchestra; engagement in the pursuit with others of similar ability, etc. IMO, the methods by which people find and train for their vocations are much better models for pursuing any interest at any age than the school model, which purports to provide a generic preparation for specialisation later.