I know the pre-programmed NPC response from the leftists.
"Other countries take over Africa and use it for their benefit and Africa is not tough enough to fight back!"
I'm not a leftist though.
Ok, I'll start. The first big factor, way back, was melanin. Melanin is essentially what gives skin and other bodily features a dark pigmentation. If you had lots of it, then it was either because you lived in a hot, sunny country, or the other way around (that you lived in a hot sunny country because you had lots of melanin). Either way, it meant that you could stay outdoors longer. White people, on the other hand, had to stay indoors more and this was much more conducive to reading books and that sort of thing. A general pattern gradually emerged, one which also helps explain why blacks are better at sports.
there are other reasons of course, but that's quite a big one.
But the positions in sports that require a lot of cerebral thinking (as opposed to physical attributes like running and jumping) are mostly held by whites. Basketball requires the least amount of thinking and it's dominated by blacks.
And if, as you say, Africans stay outside mostly because they can't get skin cancer as much, they would still be hot, right? This should have incentivized them to make air conditioning and being indoors more of a priority so they don't die of heat exhaustion, don't you think?