Why would filing BK let him stay in the house?
I rented a lovely house for 8 years, and during that time the "owner" filed bankruptcy at least 7 times (he also had debt collectors and Marshalls for other debts come by frequently), and had two auction signs posted on our tree (I removed them), and he had a friend buy it in auction. They eventually fell out and the friend became my landlord. He actually paid the mortage and his daughter moved in when we bought a new home.
That stops foreclosure, and he’s in a state where you don’t get your next bankruptcy filing thrown out because you did it repeatedly to stop foreclosure.