I don't see how this isn't illegal, or more pointedly, why everyone isn't doing it if it is legal? So you can just write off liabilities into a new company? Why wouldn't every company do this every year?
Well, it is illegal to do anything ahead of bankruptcy that would have the effect of preferring shareholders to creditors.
You can't just spin off your debt into a new company and declare bankruptcy as you wish, courts are involved, things must be approved. Clawback exists.