1. A PE firm uses a combination of other people's money (limited partners a.k.a investors) and debt to buy a company.
2. The PE transfers the debt to the company's books. This way, if the company goes bankrupt the PE fund isn't liable for that debt.
3. The PE firm charges millions of dollars in fees for providing management services. This way the PE firm makes money regardless what happens to the business.
Toys R Us was profitable before it was bought and saddled with debt that was essentially used to purchase it's own business.