Just because student loans are unforgiveable does not make them risk free. The default rate overall is about 11-15% (depending on which study you use), but if you isolate the sample size to only individuals who are eligible to default, it is more like 35% default rate. If a student can't pay a loan back, even if the loan is nondischargeable, there is nothing the creditor can really do. In this case, because it is the federal government, that default will fall on the taxpayer.
Additionally, there is still interest rate and liquidity risk. If I give you a 5-year loan at 6% interest, and it takes you 10 years to pay me back, I have lost out even though the principal and interest were originally repaid. The extra 5 years was cash that I didn't have available to pursue other avenues of profit, and I held extra risk on my balance sheet if interest rates were to all of a sudden shoot up, which increases the opportunity cost of me giving you the loan. This is the fundamental reason why 10-year treasures are not the risk free rate--even though the government can't default, you still stand to lose if interest rates were to go up because now your money is tied to a low-yielding product that you can only sell at a discount.
Without government subsidies, private sector loans for students, even if non-dischargeable, would most likely be higher for these reasons, ESPECIALLY since even though loans are nondischargeable, they might take decades to repay back. You also will take on policy risk now because everyone sees the student loan bubble and "student loan debt forgiveness" is not as crazy as it once sounded.