Shelter (and, for many, transportation) are a need for maintaining their ability to make money. As such there is some minimum amount that must be spent on these, and loans costing up to that amount can be seen as ways of making money. Most people who make these purchases do buy even more than strictly necessary, and the extra spent above the strictly necessary line should be seen as luxury expenses.
General advice for homes leads to buying a home that does follow the logic, given historic movement of home prices and rental prices. It rarely is put in those terms, but works. For vehicles, the financial recommendation generally is to buy less car as it is a depreciating asset. If you have cash for a luxury expense, then it is no different from any other large luxury purchase, but if you have to finance, go as cheap as possible (but making sure to account for the repair costs, fuel usage, and such, not just the initial cost and loan payments).