The "standard" middle class way to wealth is to work hard, save as much as you can, and put your savings into investments that will grow your money.
While a lot of people go the "buy a house" route, and make most of their investment gains from the house appreciating, others will put their money into e.g. the stock market and make their returns there.
Which part of this do you think "doesn't count" or has "nothing to do with hard work"?
If we were talking about only people who worked hard, put X% of each salary into the stock market, and ended up wealthy because their investments paid off, would that count as "getting rich from hard work"? Is your objecting specifically with the fact that their chosen investment was in a house?
Don't forget, buying a house is the same as putting money into a diversified stock portfolio in terms of work - they had to save X% of their salary to pay off a mortgage instead of putting it into the stock market, but effectually they worked the same amount and saved the same amount to end up at the same place. I don't think it's worth making a big point of difference over which exact vehicle they chose to put their investments in, as it obscures the point.
Note: I recommend the stock market instead of buying a house because, like parent says, investing in a house is more of a lottery.