To cut a long story short:
1. China has made real investments in Africa in terms of infrastructure, agriculture, technology transfer and job creation. These have genuinely benefited the Africans. Of course, it's not a zero-sum game: Africa has minerals and rare earth metals that China needs for its high tech manufacturing.
2. The US and their MNCs, on the hand, have exploited Africa by trade mis-pricing (tax dodging), repatriation of money from 'investment projects' back to parent companies, forcing open African markets (through trade policies) to Western products while making African products less competitive by banning subsidies, and misappropriating resources, without giving back the Africans anything in terms of technology transfer, jobs and development infrastructure (roads, bridges, schools, dams). Not to mention instigating civil strife so that their big defence and infrastructure contractors can swoop in and make big bucks in post-conflict 'restoration'.
It's a no-brainer that Africa chose China.