And this is why credit ratings matter. Because for people to buy the bonds the credit rating needs to be high to keep the yield (interest) low.
If a country receives a less-than-stellar credit rating, the only way they can entice people to buy their bonds is by offering higher yield (interest rate) which means they have to pay back more.
Mario Draghi, the President of the Central European Bank (who can emit so many Euros as they wish with typing something in a computer) made a statement (1) that he will defend the Euro.
The next day the debt problem was solved.
'The markets' know that governments that emit debt in their own currency, are not depending of ratings or people buying bonds because they control the currency.
The European case is complicated because the Euro is kind of a foreign currency for the Euroarea, but the China case is obvious.
(1). https://www.telegraph.co.uk/finance/financialcrisis/9428894/...
Savings bonds end up being the poster child of the debt, but less than 1% of the debt is actually bonds like that.
Supply is just as important as demand when looking at debt.