The economists of it are clear. Every financial person would tell you sell the home, and invest the money.
But people are not rational or smart, they are emotional. Psych studies tell us we percieve the loss for $10 as far more painful than the gain of $100. So if you gamble, and win $100, but then lose $20 afterwards, you will focus on the loss and often try to over compensate and make stupider bets, and then come out with -$200. Gambling is stupid like that, but people are addicted to it because of the emotional roller coaster it creates.