To the African leaders, communism was better than other types of government, it was interesting of appealing to them. Since they have been exploited by other types of government, they preferred communism.
This is your answer:
Communist doctrine was appealing to them after suffering years of exploitation and inequality at the hands of European capitalists.
Have a nice day! :)