@Ernest Bywater
Michael I can see why they want to leave a person with a basic home, but why is it the current laws will often see little folk shoe twenty or thirty grand kicked out and the home sold while the laws allow the rich guys shy millions to keep a multi-million dollar mansion? Because the laws are made by people lobbied by people with big money who want laws to protect their big money.
More likely the millionaire kept their home in that case because it was held by a trust or existed as some other kind of legal entity that both the bankruptcy proceedings and the creditors were unable to get to them.
Joe Blow technically has the capability of doing the same thing as well, but typically lack the legal know-how on how to go about doing so and keeping the entity properly separate from everything else.
It takes a bit of somewhat obscure knowledge and someone with a fair bit of time to keep things straight(which is where being rich has its perks, you have those guys on retainer/payroll to make sure all the boxes are properly checked).
The other game they'll do is the house itself may be held by a third company(that they also control). Company A pays Holding Company B "rent" for use of the house "for business functions" while the Millionaire pays the holding company(themselves) the difference.
That way Company A can go up and the house is safe as Company B "is uninvolved." Likewise, the person can go bankrupt, but because they don't own the property, Company B does(which is likely held in some form of trust), the creditors can't get to it.
It's a little more complicated than that, but they accomplish those results by keeping their money in multiple different pots which exist as their own legal entities. So that if one piece should fall, its going to take a lot of work to take all of them down with it.
Which usually means that's something only a Government could accomplish, and only in specific circumstances.