Even reading it more charitably, students and recent graduates still probably would like access to credit cards, or the housing rental market, or whatever. Bankruptcies stick with you for 7(?) years, so you'd also have to think about whether you'd be locked out of the mortgage market, auto loan market, what-have-you, while your peers are able to make those moves.
Bankruptcies are also like a whole legal thing with a judge and everything, so I doubt we'd see every single student getting their whole debt discharged instead of a judge just being like "Didn't you, like, just spend all this money on getting the training required to get a high-paying job? Seems like if you plan on working anytime soon you should make some payments."
Also lenders can just like, be more selective or restrictive in other ways? Higher interest rates, requiring more established co-signers, etc etc etc. Honestly the strangest part of this is that we've normalized saddling 18 year-olds with tens or hundreds of thousands of dollars of debt.