It doesn't look like you read the entire article. $22k is the non adjusted raw sale profit. That's also $22k over 10 years, which may or may not be a good return depending on how you're considering how much is spent. If my math is right, if you spend $1400 per month instead of $1600 (break even point), you'd save $160 a month and make more money that purchasing that house using those calculations. It does not factor in taxes, insurance, and general house stuff - which I'd guess is going to be more than the left over profit, but that depends on a lot of factors.
Personally I reached the same conclusion as the article, but I also pay such cheap rent for my apartment I'd really have to be crazy to buy a house. If houses where I live weren't overpriced, and my rent were high that would be different. The point of the article wasn't "buying a house is bad", it's that you really need to look at the many factors involved to make a fair comparison. Even if you don't "make a profit", maybe you enjoy living in a house that much more to make it worth it. It seems to be a common mentality that you MUST buy a house because that's what Americans do and you OWN it, but I think the modern real estate market really preys on that mode of thinking. If you don't have a family (especially if you're single), renting may be the better choice.