HISTORY LESSON TIME!
Before the 1930s, there was basically no such thing as a 30-year mortgage. The standard was 15 or 20 years. During the 1920s, there were a lot of dangerous exotic products like "balloon mortgages". Folliwing the 1929 crash, huge numbers of people were losing their homes to foreclosure. The banks were unable to actually handle the house reposessions and were letting the houses rot and go vacant. (Sound familiar? It happened after the 2008 crash too.)
As one of the emergency measures to fight the Depression, FDR passed a law which replaced most of the 15-year or 20-year mortgages to 30-year mortgages. This allowed people to make lower payments and not lose their houses, while allowing banks to get an income stream rather than trying to handle all the house repossessions. This worked well as an emergency measure.
However, for some reason -- habit, popularity -- the 30-year mortgage persisted. It makes no economic sense for the most part; for it to make economic sense, you have to (a) plan to live in the house for more than 30 years, and (b) have a house of such high build quality that it will *last* more than 30 years with minimal maintenance, and neither is true in a typical house. Basically the 30-year-mortage market has been backstopped by federal government agencies for its entire existence, and would probably disappear if the goverment were not the primary mortgage financer, or if the government decided to stop extending what was actually a 70-year-old emergency measure.
If you're on a 30-year mortgage you're basically a renter. If you can afford a shorter mortgage and you plan to keep the house, you want a shorter mortgage.