This is such a weird take.
Of course it's not a gift. It's a trade. But it's a
beneficial trade, just like how having a bakery near you is beneficial. Just because the bakery wants something in return doesn't mean that having a bakery near you isn't beneficial to the community. Just think about how
weird it is to accuse the electric utility company of "not being there for altruistic reasons" or that "they are plundering your bank account". Like, is your life
really better off if you save on utility bills while not having electricity?
Nobody is forcing Africa to give China access to minerals. China is not coming with guns. African leaders have said multiple times that when they say "no" to China, then China says "okay here's another proposal". They don't return with an army to force you to sign. If African nations signed a bad deal then they ought to take responsibility for that. These are countries that are supposed to be accountable for their own decisions, not toddlers. The onus is on them to do their homework before they enter a deal.
If you dislike the fact that Africa voluntarily makes such business deals with China, then maybe you ought to give Africa better business deals, or perhaps even gifts (as you seem to imply that only gifts are beneficial/valuable).
Unfortunately, western countries are doing neither: they keep lecturing about not working with China while also not providing any alternatives. Why do you think Africa deals with China in the first place? Because dealing with China — even if China's deals are not always problem-free — is still more beneficial than inaction and the status quo! Africa benefits more from having roads, bridges, schools and hospitals than from hoarding minerals.