If you want to buy a million dollar home using shares, you have to liquidate them and pay capital gains. By getting a mortgage you lower the amount of income you 'realize' on a year-to-year basis, lowering your taxable income. There are details on capital gains vs income taxes, etc, but in general I think the point was that the less income you realize in a given year, the less taxes you'll pay.
"If you want to buy a million dollar home using shares, you have to liquidate them and pay capital gains. "
Just to note: you don't :)
In fact, if you wanted to pay all cash, and had enough shares, you'd generally take out a portfolio loan against the shares at some very low interest rate (probably not lower than current mortgage rates however) rather than sell the shares at all.
Whether this is better/worse than a mortgage depends on various things.