Humans originated in Africa and then spread out from there. And thousands of different languages are spoken in Africa- but surprisingly few language families. We’ve got Afro-asiatic (mostly Semitic) in the north, Nilo-Saharan, Niger-Congo in the middle, and a small pocket of Khoisan in the Southwest. (I’m disregarding Madagascar and the more recent colonial languages like Afrikaans, English, French and so on).
Other areas of the world that presumably received their first human inhabitants much later than Africa - like the Caucasus, India, New Guinea and Pre-Columbian North America, seem to have much more diverse ranges of languages (New Guinea having maybe as many as 60 language families).
What accounts for the small number of language families in Africa? I am not a linguist but I have a few hypotheses:
Perhaps the language families of Africa are more diverse than I’m giving them credit for, and are really more like a geographic designation of unrelated languages (like “Australian aboriginal”) than a true language family.
Maybe there used to be many more language families, but most of them went extinct in prehistory.
I am aware that /r/asklinguists exists but I figured that I would get the best response here.
EDIT: I asked at /r/linguistics and received some insightful comments: https://www.reddit.com/r/linguistics/comments/7b8yuh/why_isnt_africa_more_linguistically_diverse_in/
I suspect that linguists might, in fact, have more satisfactory answers for you. I'll say two things, though. First, although the African language families are indeed related to each other, they are indeed quite diverse. There are well over a thousand Niger-Congo languages.
Second, most languages in the southern half of the continent are Bantu languages, a phenomenon produced by the Bantu expansion that started ca. 1000 BCE. There were indeed different languages spoken in these areas before that date, and traces of some of them survive in modern Bantu languages.