When you borrow money to buy something, it’s not uncommon for the thing you bought to be used as collateral for the loan. The obvious example is a house mortgage – you borrow money, the house is the security. This makes the act of borrowing itself reasonably risk free: if the purchase falls through, the loan is dissolved and all you’re out is some administrative fees. Your real risk starts when the purchase is successful.
TL;DR – Borrowing money to buy a house is to leveraged buyouts as a pat on the cheek is to a punch to the testicles; same general act, very different implications.