Archeologists and anthropologists have recently come to the conclusion that the technology of spoken language was invented around 70,000 years ago. This is when they see a sudden explosion of evidence of a great number of complex, intricate, coordinated tasks that could not possibly have been performed by people who were, at the same time, using their hands for communicating signals.
By this time, our species had spread out to inhabit all of sub-Saharan Africa, but had not yet made a successful migration to the other continents. I haven't seen enough articles on this topic to know where language was first invented or how quickly it spread to the rest of Africa. However, technologies that are entirely cerebral and involve no tangible artifacts generally spread very quickly from one tribe to another, so I suppose it would be impossible to answer this question.
At any rate, even as recently as 1,500 years ago, languages continued to evolve, and they evolved differently in different communities, in response to their environment and culture. Latin split into Portuguese, Spanish, Catalan, French, Occitan, Romansh, Italian, Sicilian and Romanian during that time; while Old High German split into English, Dutch, Afrikaans, Frisian, German and Yiddish; and Slavonic split into Russian, Ukrainian, Belarusan, Bulgarian, Macedonian, Serbo-Croatian, Slovene, Czech, Slovak and Polish.
Modern transportation and communication technologies have brought the various "tribes" of humans closer together, yet we still modify our languages to suit our own needs. Brazilians and Portuguese talk much differently, and the speakers of the many dialects of Arabic can only understand each other well when they use the formal Arabic of the Koran, which has been standardized on radio and TV. When I was a kid in the 1940s and 50s I found it very difficult to understand American Southerners, although radio, TV and population movement have reduced what were once dialects into mere accents. I had the same problem with British English, which is also much easier to understand after decades of swapping movies, rock'n'roll songs and TV shows.
It's very likely that there was originally one single language, which changed to adapt to the lives of the people who spoke it in different regions and different times. We don't know this for sure, and we probably never will, since in a few thousand years a language can change completely: vocabulary, grammar, phonetics, even its fundamental perspective on the universe. But we do know that the Na-Dene languages of western North America (Navajo, Tlingit, etc.) are related to the Yenisei language of Siberia, and those people have been separated for at least 8,000 years. (Not all linguists are convinced yet but the evidence is strong.)
So this is the answer to your question. The reason there are so many different languages is that language adapts to suit the needs of its speakers. As civilization becomes more integrated you can expect to see fewer languages. Perhaps eventually just one.