It’s paid using existing debt collection channels, which means the private insurance is only making pennies on the dollar, and it’s money they would have already made anyways.
Let’s say an insurance company has $1M in outstanding debt to collect. They don’t want to bother with actually collecting, because they know the chance of actually collecting any individual debt is low. They’re willing to write off a lot of it as a loss, but they want to get some money for it. So they sell it to a debt collector.
The insurance company takes that $1M in aggregated debt, (owed by dozens or even hundreds of people), and a debt collector buys it for like $50k. The debt collector gets the debtors’ contact info, and how much they owe. Oftentimes, that’s basically all they get.
Now the debt collector can work on actually collecting that debt. They know that collecting on any one person’s debt will be difficult, but anything past that initial $50k investment is pure profit for them. And there is a lot of potential profit to be made on that $950k. They’ll be able to do things like offer steep discounts to debtors, because even 50% of the debt is still $450k in profit. They’ll work on that aggregated debt for a while, and the ones that they can’t collect on will get re-aggregated and resold to another debt collector for even less.
The government basically went “well companies are already selling the debt… Why don’t we just buy it and forgive it? It’ll be cheaper than paying their debts outright or fighting with the hospitals to lower bills, and it doesn’t require getting voters onboard with socialized healthcare.” If they’re able to spend $50k to forgive $1M in debt, that’s a huge win even if it means $50k lands in the insurance company’s pocket. And again, that money would have eventually made its way to the insurance company anyways, via normal debt collectors buying the debt.