No, they wouldn't. Source: go back a couple decades, and student loans had low interest rates and were dischargeable in bankruptcy. It was an option. And, in fact, practically nobody did that.
Simply, people were not playing the game that way in any serious way. I am pretty sure I have never met a single person who declared bankruptcy purely to avoid a student loan.
Student loans are still dischargeable in bankruptcy to this very day, but there are restrictions.
Those restrictions started being introduced in 1978, so more than a couple decades ago.
The justification for student loans being exempt from bankruptcy is simply that there is no asset to be repossessed. Car loans, mortgages, and HELOCs are different. Credit cards have very high interest to pay for the higher risk. I guess we could have student loans with 29% interest, would that be preferable?