Well, no, because bankruptcy isn't an option most people want to pursue, and personal unsecured credit is far more expensive than student loans with the same principal unless you discharge them in bankruptcy.
If you did it knowing you were insolvent and planning to file bankruptcy, it would be illegal, and that would be taken into account in your bankruptcy (it might effect the dischargeability of the credit card debt or have other adverse consequences.)
Of course, credit cards try to keep up with your credit circumstances and adjust your credit lines appropriately, to guard against that general class of scenarios.
If you did it routinely while in good financial shape but later declared bankruptcy with the balance still on your credit card accounts, it would be discharged like any other credit card debt.
Also, transferring loans around with the intent to declare bankruptcy is fraud, and while you may skate on that initially you won't when you're in court.
If I borrow from Peter to pay Paul, I have Peter debt now, not Paul debt.
In a court? If you borrowed from Peter to pay Paul, knowing that Peter’s debt is discharged in bankruptcy and then you declare bankruptcy? I have a feeling a not too impressed bankruptcy judge will be entering a sizable judgement against you.
if you've got student debt of $50k but only $5k available on a credit card... you're not going to be able to do this.
On top of that its going to be extremely difficult to get tens of thousands of dollars in unsecured credit, especially if you're in a position to declare bankruptcy.
Don’t try this.
Maybe the CC company could come after you if they did their research?