Renting isn't like owning a house. You can be kicked out of your rental unit if your landlord decides to do a number of things, such as converting your rental to a condo or sell the property. Rents can go up arbitrarily.
A paid off house gives you a type of stability, belonging and security that rentals don't generally offer (at the expense of flexibility and mobility). I'm not trying to say that owning is better than renting, just that they are different enough for the "buying your house isn't an investment" statement to be mostly true.