China got a foothold because they focused on infrastructure, the greatest need for many African countries. Western countries and their agencies had stopped focusing on those things a long time ago. They preferred to have interventions at a micro level, some village project here and there and some donation of food (which killed local farmers) and those type of interventions. China was at a similar level to many of those countries barely 3 decades back so they understand the game better than mostly Western institutions that believe you can import ideas suited to developed economies like tax cuts, privatization etc. Resources are only as valuable as what people are willing to pay for, and the big buyer these days of those commodity is China. It could be argued that without its rise those commodities like iron ore,copper,steel etc wouldn't be as valuable. African nations are going to trade and because of their deficiencies have to look for external support for many of the big projects. The view of Africa politically is different in China compared to the US for example. In the US the narrative is driven by a helpless continent that needs to be helped, it wasn't even a big foreign policy area for the country.For instance when they had the summit with those leaders they barely had much African press and the press that did show up preferred to ask Obama about other domestic issues.
There are many sides to the China-Africa story but for the most part the countries that have managed to get good deals with them have made out fine.Zambia's copper industry was virtually dead before China and they have revived it after previous owners bolted. The Chinese built the railway between Zambia and Tanzania in the 70s to help landlocked Southern African countries reduce dependence on Apartheid SA and its sponsored bandits in the region, this was when the West was complicit in supporting Apartheid SA. They were also training freedom fighters in then Rhodesia while the West again was going through the motions in condemning those bad actors, they were on hand to establish lines of credit to Angola after the civil war ended with the formerly Western sponsored Savimbi. China established goodwill in parts of Africa way before it became a topical issue in the Western press. And its not like African countries have not tried the alternative of IMF/WB which failed spectacularly, its not only African countries but Latin American countries where China has been gaining a big foothold loaning even bigger amounts to Argentina and Venezuela than any single African country that we never get to read about in the same way the Africa-China story is told.