I have read through my world history book and did some research online, but I have been unable to learn why the first Universities were created?
University: from Latin universitas magistrorum et scholarium ("community of teachers and scholars)"
The university (as we know it today) was not created ex nihilo but rather grew out of something else, which was the pursuit of learning in urban centers among those who could afford it.
European higher education as far back as the 6th century was often found in Christian cathedral schools or monastic schools. Monks or nuns were the usual instructors. An example of one such school that later transformed into a university is the University of Paris. But the Church was not the only source of higher education. There had been a tradition for centuries of private tutors for the children of those with the means to afford them, and of course the opportunities for a select few to study with famous scholars from which "the Socratic method" has been passed down to us.
The University of Bologna was founded in 1088 and is arguably the oldest university in Europe. It was established as a guild/group of students who were learning civil and canon law, and found it in their interest to form a society/guild for other reasons.
The University arose around mutual aid societies of foreign students called "nations" (as they were grouped by nationality) for protection against city laws which imposed collective punishment on foreigners for the crimes and debts of their countrymen. These students then hired scholars from the city to teach them. In time the various "nations" decided to form a larger association, or universitas — thus, the university.
The "why" in this case was as much protection from political bullying as advancement of education.
In contrast we can look at the University of Naples, founded in 1232. It is the most ancient state-supported institution of higher education and research in the world.
A university founded by a head of State was slightly different from the guild/corporate model with the same general purpose. The Emperor Frederick II created this university with the hope of curbing or opposing universities of Northern Italy (such as Bologna and Padua) which he felt were either too independent or under the strong influence of the Pope.
The "why" in this case was politics as much as it was the advancement of education.
The independence was granted by the Charter, which gave the Emperor the highest authority. He hired professors, who would become royal employees paid through royal funds. Moreover, the Emperor himself examined candidates and conferred degrees.
(It is somewhat ironic that Thomas Aquinas was one of the early distinguished graduates of the University of Naples, given the ideological tension between the clergy and that Emperor.)
During medieval times, the only thing close to what we would call education was carried out by the church. Usually by monks and nuns, studying religious texts and similar items. Some of these schools tended to be much better at this than others, and essentially this gave the opportunity to those more gifted in academia to study further and it became more than just learning to read and write, it became more about study of the texts and what they could mean. The exceptional schools then slowly transformed into what were known as universities.
This all grew in Europe, and eventually they started coming out of the hands of the church. They started to be created by royalty. With things like The rediscovery of Aristotle's work, there were plenty of young men who yearned to learn about things like mathematics, astronomy and literature. These students didn't always study religious texts or similar (although it may have played a part), it was more about the study of new and exciting things like science and engineering. This is arguably where the modern university culture started.
if you want more info, the wikipedia page on universities has some good examples of universities created around this time, but obviously remember it is wikipedia, and its just to get the idea of the world at that time: https://en.wikipedia.org/wiki/University#Medieval_universities
The USA modelled it's education system on Germany's (started with Kindergarten of course) and then ending with your "Gymnasium" or PhD.
The first Universities were in Upstate New York (Cornell, Colgate) and were "land grant Universities" dedicated to the study of Agriculture.
This they did very well...