Yes, you probably shouldn't buy a house if you imagine you'll want or need to move in the next 7-10 years. And, yes, it's also not the case that there is zero risk. It's just lots of leverage with favorable tax treatment. But it's not a magic money machine.