It is a question I have always wondered, I realise there is no right or wrong answer but "colonialism" doesn't fully explain it. With the exception of North Africa, Africa as a whole wasn't fully colonised until the 1800s, so why didn't Africans do what Europeans done and attempt to expand?
While you're waiting for someone to give you a proper answer, you might find this part of the FAQs, and this thread in particular, helpful.