If you live in California, your spouse signs the QCD enabling you to process a mortgage.
Some states don't require a QCD. They may require a warranty deed and the spouse to sign the settlement statement and another doc or two.
This happens a lot of times IF the non borrowing spouse has bad credit and cannot be on the loan for one reason or another.
I had one where the spouse owed back payments for child support from a previous marriage.
The child support payments killed the debt ratio and couldn't qualify for the loan.
Tax liens, bad credit, Bankruptcy or short-sale seasoning requirements, too much debt, wage garnishments etc are other reason that would prevent a spouse from being on a mortgage.
NOTE: Fannie Mae and Freddie Mac look at a short-sale JUST LIKE a foreclosure!!
Fannie/ Freddie require 7 yr seasoning. FHA requires three years seasoning from the date of the disposition. NOT the commencement of the foreclosure process.