I think it's because of the mind trickery that makes the first thing a solid "buying a house" investment and the second thing a "gambling on the stock market" game. You can easily see that trickery at work: just confront someone who bought a house on credit with the fact that he just put all his money into a highly leveraged single investment, which combines two of the usual "don'ts" from the "Investment for Dummies" book. You will usually earn blank stares.
Not saying that doing such an investment doesn't make sense in certain circumstances (use the house yourself and plan on staying there for decades), but one should be very clear about the risk profile of it.