Based on these facts, why are people getting into 30 year mortgages? What am I missing?
You are correct that 30 year mortgages are a poor decision for some people. However, I agree with James that they are just a tool, and they are incredibly useful for many people and quite dangerous for others (not unlike a rewards credit-card with a high APR).
Here's my own situation for some perspective. I have a 25 year mortgage (30 year mortgages in Canada don't exist, but the difference in monthly payments betewen 25 years and 30 years is negligable). Also, there is no mortgage interest deduction here, so it fits with your idea that many don't benefit from the deduction (which is true!). Also, when we purchased our home we could only be certain that we'd be living here for 7-8 years, and then there would be a high likelihood that we'd be moving. So in all we fit your assumptions of a 'typical' person with a long-term mortgage.
So why did we do it? Well, for starters we qualified for a 3.1% interest rate. This meant that on our very first payment 46% was going towards principle. By year 7 almost 58% will be going towards principle. This changes the buy-vs-rent equation significantly.
Second, in our particular area renting an equivalent place would be about $300 more per month. Using the calculator below from the NY Times it was always better to buy than rent given our circumstances. Third, we just like being home-owners. We like knowing we can do what we like, do some renovations, and best of all that we don't have to worry about moving or having the rent raised every year. That's less of an economical arguement than a personal one.
We could have gone with a 15 year mortgage, but given the ridiculously low interest rates available, it was LESS attractive for us to pay almost double each month. Also, at the time we purchased the house I could have sold my investments to purchase the home with cash (but just barely). However, this was unattractive to me, since my entire net worth would have been tied up in that one single home. I would have lost almost all diversity and wound up with something that historically does not preform nearly as well.
I will say that there are a great number of people who take out a 30 year mortgage to allow them to buy more house than they should... but then again you could make a similar arguement about credit cards. The 30-year is a tool, which can be used productively or abused to financial ruin.
http://www.nytimes.com/interactive/2014/upshot/buy-rent-calculator.html?_r=2&abt=0002&abg=0