Having seen a contractor go bankrupt, his house, car and his work tools sold to the highest bidder and the money split evenly between the tax man (the rest of his stuff) and the bank (his house and vehicle) very recently says there is at least one situation where you were simply dead wrong.
There is voluntary bankruptcy, and involuntary bankruptcy, see http://en.wikipedia.org/wiki/Bankruptcy it is not fair to suggest all bankruptcies are voluntary.
I suppose under the circumstances you describe, you are correct: a person may lose their job if the corporation they work for goes bankrupt involuntarily. On the other hand, corporate bankruptcy can't touch a person's house/car, unless perhaps that person bet all their personal positions on the success of a corporation.
So I suppose an involuntary corporate bankruptcy may cause the personal bankruptcy of an entrepreneur. I'm still not sure how this rather unusual situation would contribute significantly to the number of homeless.
Self employed people are private individuals and are with some regularity pushed in to being homeless, either alone or with their families if they have them due to economic downturns.
There now is some nice legislation on the books that will make it impossible to escape credit card debt when you file for voluntary bankruptcy (chapter 7), and it is also much harder to file for that than it was in the past.
Typically an individual that has been declared bankrupt can be evicted from rental property as well because of debt incurred after the stay due to the filing for bankruptcy.
So even on rented property there is no guarantee that filing for personal bankruptcy will protect you from being homeless.
If you mismanage your finances, really the worst you need to worry about is losing some of your stuff (which you probably couldn't afford anyway). If you make more than the median income in your state, you might need to enter a payment plan rather than having your debts wiped away.
The tax man or your ex wife can ruin your life with debts that can't be wiped away. The bank, not so much.
[1] The judge needs to decide that you can continue paying the mortgage, which might not happen if mortgage/month > income/month. Further, there is a value above which this no longer applies - rich people may lose their estate or the Bentley.