Let's say England or what we'd call Germany today. I use "middle ages" broadly but I'm interested in who the student body was at a place like Cambridge or Köln around the time of their founding. I recognize that it would have been children of the aristocracy/well-to-do, but:
How? Who would have told them to go or how would they have known to go?
To what end? Now many of us get an education to get a job but what would have been their impetus?
What did having a university education equate to? What did they come there seeking? Actual knowledge and wisdom or to accomplish some goal, as we do today?
Most of the members of the 13th century universities were from what we might now term the "middle class," although the representation from the lower nobility was not insignificant.
Two processes - namely the centralization of the religious and secular bureaucracies - in this period essentially provided the universities with their purpose. Bureaucracy requires paperwork, paperwork requires clerks, clerks need training. Moreover, if you want to argue a case before the papal curia (all appeals lead to Rome, if you have the money), then you need a trained advocate, and for a trained advocate you need a law school.
This is a fairly simplistic analogy, but I think it will serve for our purposes here: just as the modern university trains students who go off and do all sorts of things while a few remain to serve as faculty, so too with the original university. At Paris and Oxford particularly (Bologna was more focused on law), these were generally the 'great' theologians, which makes sense since theology was the thing you studied after you had mastered all of the other subjects.
So, like the modern university, the goals of the members of the medieval university was diverse, based on the twin desires of improving social position and the pursuit of knowledge.
Some reading:
Van Engen, John. “Letters, schools, and written culture in the eleventh and twelfth centuries.” In Dialektik und Rhetorik im früheren und hohen Mittelalter: Rezeption, Überlieferung und gesellschaftliche Wirkung antiker Gelehrsamkeit, vornehmlich im 9. und 12. Jh, edited by Johannes Fried, 97–132. Schriften des Historischen Kollegs 27. München: Oldenbourg, 1997.
Smalley, Beryl. The Study of the Bible in the Middle Ages. NDP 39. Notre Dame: University of Notre Dame Press, 1964.
Ullmann, Walter. The Growth of Papal Government in the Middle Ages: A Study in the Ideological Relation of Clerical to Lay Power. 3d ed. London: Methuen, 1970.