I agree about student loan being a complete commitment.
A mortgage, however is a secured loan with an interest rate tied to the risk of the loan. Especially if you're paying points, PMI or a higher interest rate, the chance of default is already calculated into the house and is part of the risk that the lender's responsibility. They also made a commitment to take it back if you don't pay (and you've paid for that privilege, perhaps dearly.)
Student loans are a bit different because some interest rates are heavily subsidized (some are not). If you're paying a high interest rate, then you are paying for someone to accept the risk of not getting paid back. Default, they get punished, they stop making bad loans, the market corrects.
Instead we've jammed a penny in the circuit breaker and loans must always be available and are near impossible to discharge. Government backs or bails lenders out and nobody gets punished for contributing to the mess (and driving up prices for cash payers too).
edit tldnr -- Loans are not priced based on moral commitment to them. If you get a loan priced as such (interest free from a friend) honor that commitment. If you pay extra for the inherent risk, let the risk taking parties honor their commitment, too.