It is not done with malice.
The IMF/WB believe that nations that have basic infrastructure, basic forms of democracy, low corruption and relatively open markets ... will be successfull. This is neither malicious nor entirely naive.
It's pragmatically naive when you consider the leader of some nation may take a 10% cut off the loan, hire his buddies to 'build the dam that never gets built' and then of course you have a nation in debt ... but those debts are not advantageous to the West at all, so the conspiracy theories are wrong.
Now - where there is actual malice is when a large, Western industrial conglomerate might win a big contract and so they influence, bribe, fake data - and then get the contract to 'totally overbuild' some kind of capacity leaving a nation with way more than they need. That's malice, but it's definitely not the IMF/WB or lending nations that win there.