From a complete amateur:
There are tax differences. You can deduct mortgage interest with mortgage payments, but only if you are paying a lot of interest will you be able to itemize deductions over the standard (that is, mortgage interest plus other deductions over 6300 single/9300 hh, etc.). So, if you have a big mortgage and/or are paying it back over a long period of time, you can deduct that. That means you change your tax bracket; it is not a dollar for dollar deduction. Maybe you are getting 30-40% reduced on the figure above your standard deduction?
You do take risk in carrying debt. What if your investments go bad? What if you lose your job? What if you have a big unexpected medical debt crop up that prevents you from taking care of the other debts? Then you might end up bankrupt. Med. bankruptcies used to be 1/2 of all of individual ones before the ACA. Now, by contrast, if you are paying off your mortgage in 15 years or even in five or six years on 2x/month payments on a 15 yr mortgage, and interest is 3-4%, you might save 50-100k in interest and be able to devote your salary to savings entirely after that time is up. It also functions as a big forced savings program, so that you have the value of your house at the end--the forced savings--and then with that discipline you will hopefully be able to continue to sock away a good portion and earn interest on that. All in all, maybe it is a wash, but I think that it is likely better to do this for most who could not otherwise put the extra money from lower payments on debt over a 30 year mortgage into high-earning investments, etc. Of course, I'm not factoring in inflation--at 2% per year inflation, but 3% interest, your debt is appreciating only at 1% per year in real dollars, not counting payments, so that is very sustainable and a run of higher inflation and it may actually decline in real dollars. Another factor is that on average salaries are increasing pretty close to inflation, maybe a bit more.