However, the flaw in this is that most people don't have the discipline to put excess cash they would have spent on a home into index funds and forego touching that money until retirement.
So a mortgage is a very compelling enforcement mechanism to get average people to save for retirement.
If we're being honest that's a much more powerful reason to buy a home than "leverage."