Before 2008, everybody in the real estate business was making money by selling houses and arranging mortgages for under qualified buyers who saw home ownership as a giant step to participating in the American dream. Contract prices were inflated so that the seller could give a buyer a "credit" at closing for the buyer's closing costs. Then a real estate appraiser who agreed to appraise the house at the inflated value was hired. The sales contracts contained the seller's credit provision, but the banks gave mortgages based on the full contract price. The banks assumed they would not have to foreclose because house values would increase so much, the borrowers would be able to pay off the mortgage balance when they sold the house. The banks didn't care anyway because they sold most of the mortgages which were packaged and sold in blocks to investors such as pension funds. Everybody got what he wanted. For a time, the plan worked, and borrowers who fell behind did sell and made enough to cover the mortgage. When that didn't work anymore, and the banks began actually losing money, they pretty much stopped writing mortgages.
Student loans were originally a sort of feel good program to enable non-wealthy students to obtain a college education. I don't know what the default rates were until recently, but colleges abruptly raised tuition to the point that the loan balances could not be repaid unless the students all got jobs paying six figure salaries upon graduation. If the students' debts are forgiven, who takes the loss? The banks? If so, why would any bank ever give a student loan in the future?