SJ, you're right on the money. Even my clients who had the ability to pay cash for a house got a mortgage. They were very conservative people and also financially savvy about investing for the long term. Consider that every 10 years or so the stock market averages 10% and you're not a day trader, having a mortgage makes sense with low rates. I do want to add they did not do 100% financing or any tricky or liar loans.
Full doc, good debt ratios, low loan to values and excellent credit.
Not so conservative if they chose to invest versus payoff their mortgage. Nearly every conservative financial planner will advise clients to payoff the mortgage.
And, your statement about investing in the average stock market versus paying off the mortgage is dead wrong.
Here are some examples (mortgage rates are from Freddie Mac website)--
1972-- Market reaches 1000. Average return from 1972 through 2002 (length of a 30 year mortgage) when market was around 8400 is about 7.4%. In 1972, mortgage rates were running in the range of 8.5%. Paying off the mortgage would have been a much better deal.
1977 --Market at about 1000. Average return since then is about 9.4%. Average mortgage rate in 1977 was about 9.1%. A better deal to pay off the mortgage especially considering the return is risk free and the stock market is fairly risky.
End of 1982--Market around 1000. Return since 1982 to today at 12000 is about 10.5%. Mortgage rates were around 14%

at the end of 1987. Again, definitely payoff the mortgage.
End of 1987--Market around 2000. Return since 1987 to today at 12000 is about 9.5%. Mortgage rates were around 10.5% at the end of 1987. Again, a much better deal to payoff the mortgage.
End of 1997--Market around 7800. Return since 1997 is about 4.5%. Average 30 year mortgage was around 7.1%. Paying off the mortgage would have been a smoking deal.
Also, the market does not average 10% growth per year. I always hear that number quoted, but it just isn't true. In 1940, the market was around 100. If you had invested in the Dow in 1940 at 100, your average annual return would have been around 7.4% through yesterday. Go back to 1920, and the average return drops to under 6%.
The moral of the story--always, always payoff the mortgage. I'm not sure who started the myth regarding keeping a mortgage if you have the wherewithal to pay it off (probably a mortgage broker;-)just kidding), but it is an urban legend.