Bankruptcy can take two forms. The key question is, "if this company got out from under its debt and didn't have to service it, is it still a viable company?"
If there is actually a viable business there, it makes sense to wipe out the shareholders, extinguish the debt, and make the former bondholders the new shareholders.
If there is no viable business even with the debt, then liquidation is the right path.
(I'm not a finance professional, just another person on the internet with an opinion.)