There are different strategies. You can buy up dying companies and try to turn them around with management changes (and debt), you can sell off companies for scrap, you can buy up money printing machines and run them hotter.
People love to vilify PE for destroying companies, but a lot of these companies were dying anyway, and PE was trying a last-ditch, high-risk reorg to save them.
It's still possible to make money in this situation. Buy a company, then have it buy itself back using debt. The PE firm gets most of its initial capital investment back then secures a revenue stream in the form of management fees. The company can still go bankrupt, but as long as it sticks around long enough to pay back enough to the parent company that it turned a profit, things worked out. The bond holders can fight over the scraps post-bankruptcy.