Could be a trap, or could be their plan to remain in power. While North Korea placed their bets only in the military, the Chinese went for wealthiness (capitalism). After all, is not like you are forced to ask loans from them... Venezuela got them in exchange for oil AND supporting their international political position (ie. Taiwan, Tibet, Hong Kong...) during Chavez. But after Maduro did what he did to the economy, even China stopped loaning.
They became an attractive alternative to the World Bank and the World Monetary Fund, with their Chicago school of economy thinking (growth by debt).
"Forced" can be subjective. I would like to recommend a good book related to this subject.
It describes in detail how powers can in fact force countries to enter into debt, then start harvesting the nation of all of its resources.