As Dan mentions, just quit claiming the property does not eliminate the mortgage debt. I would also note that if the grantor on the deed was also a grantee (e.g. John Smith grants to John Smith and Jane Smith, husband and wife), then all they are doing is changing title to how they want it. In your case it's possible the wife had bad credit and the mother did not want to be on the loan, but there could be other explanations.
I would also note that there may be legal implications to doing this sort of thing, but I wouldn't necessarily describe it as being "illegal." For those the parties would need to consult an attorney.