1. by owning the (often insane) debt from the programs
2. by getting a lot of Chinese jobs in the country
3. by gaining influence over the country (at the expense of Western influence, if you see this as a competition.
Another problem here, although it’s not a benefit to China, is that the quality of infrastructure built by China is often terrible, making the cost and debt even more problematic.
Now, having said all that, the US isn’t necessarily doing much better. And the poor quality Chinese roads (just as an example) are still infinitely better than the competing local-built roads.
And as for starting a war, China doesn't need to threaten to start a war with a country in order to have the threat of such playing into Ethiopia's leadership decisions. You don't want to piss off China any more than you want to piss off the USA.
Sri Lanka had to hand over a port for example.
https://www.abc.net.au/news/2017-01-07/sri-lankans-protest-c...
On the other hand, developing countries often have bloated bureaucracies and corrupt governments that are heavily involved in the private sector and corporate activity.
The difficulties I mentioned in my original post are those in which the Government is heavily involved. Corporate investment in properly functioning nations are free from (public) political hindrances.