Yes people who move often shouldn't buy. No disagreement there. But that's like saying that you shouldn't invest in stocks because if you sell in a year then it's probably at a loss. Investments are to be held for a long period.
As for investing: you invested what you had left after rent, but you didn't invest what you paid in rent. With a mortgage, you are investing the mortage payment minus interest, and you can still invest what you have left.
As for investing: you invested what you had left after rent, but you didn't invest what you paid in rent. With a mortgage, you are investing the mortage payment minus interest, and you can still invest what you have left.