You hold Enron stock. You’ve been taxed 5% annually on the holdings for the past 5 years. To pay the tax, you decided to take out a loan instead of selling shares to pay the tax (you want to stay invested).
Someone discovers Enron is a fraud, the stock goes to $0 and you go bankrupt because you can’t repay the loans you took out to pay the tax on a (now worthless) asset.
But yeah, if you take out a loan against your home and the housing market collapses and you lose your job (ala 2008) you can end up destitute. The stock market is always a gamble and this doesn't make that better or worse.