Debt restructuring can be a win-win for both sides because the business avoids bankruptcy and the lenders typically receive more than they would have through a bankruptcy proceeding.
The process works much the same for individuals and for nations, although on vastly different scales.