if students could declare bankruptcy there would probably be no student loans. there are already very few private loans available to students without substantial credit history or a cosigner. how could the numbers possibly work out?
to graduate in four years from a state university (paying in-state tuition) costs about $44k. a typical college freshman has close to zero assets and no credit. if they have any income, it's probably a part-time minimum wage job. assuming they don't qualify for any aid, these people need to borrow about $10k each year and likely won't pay any of it back until they get a degree.
now let's pause for a moment. how many ways can you get an unsecured $10k loan with limited to no credit history? they basically don't exist. you would need to build credit for a long time before you got a limit anywhere near that on a credit card, and their whole business model revolves around loaning people more money than they should.
now consider that in the US, about 40% of students fail to get their bachelors in 6 years. obviously these people will not be able to use the degree to obtain employment, and probably will not ever pay down the debt in full unless they enter a lucrative trade that didn't require the degree in the first place. if we assume that the students who graduate are able to repay the loan, they have to pay a significant amount of interest before the lender breaks even on the group of loans. and keep in mind that there's no guarantee that a student who graduates has acquired a degree that actually improves their earning potential.
so tl;dr: it is really hard to offer a reasonable loan of that size to an 18yo with no skills/assets who stands a substantial chance of either not finishing or finishing with a valueless (to the market) degree.