If a woman goes to college, racks up 10s of thousands of dollars worth of student loan debt then gets married.

Why is her student loan debt transfer-able to her husband (community property laws), but the same student loan debt is not dismiss-able if she (or the married couple) files for bankruptcy ?