On one hand I don’t think China is doing that much wrong here, at least nothing worse than other countries.
But basically because it’s not “those countries” giving those things away, it’s the corrupt kleptocrats who represent those countries which are giving them away in exchange for some personal gain. They don’t care about what it does the country because they can take their personal wealth and family to London or Miami and forget about it
If the debtor country doesn't cooperate the lender has all manner of soft and hard power to fall back on. They can fund political opponents or instigate coups to install a puppet government. Organize sanctions, train guerilla fighters, or even overtly start a war.
Needless to say, China is not exactly a pioneer in this space...
But doesn’t this make a huge opening for someone like the US to step in and say: “hey, we will bail you out and stop China from interfering. Just sign this treaty and let us occupy with some troops”?
You can’t buy infrastructure in other countries because it’s not for sale. But when countries default on their loans, they can repay with infrastructure, e.g. with the thing they lent money to build.
It is a kind of economic warfare, you could say, except it’s completely legal to bet on some country lending and defaulting.
If they don't, they can't get new loans anymore, which will doom the country. It's really hard to grow your economy without foreign reverses. Even North Korea, a hermit kingdom, works really hard to grow their foreign reserve.
Why would any country do that?