When people buy a house during the marriage, each spouse has very extensive homestead rights. Such rights are designed to prevent a person’s home from being taken away without their written consent. They would block a bank’s right to foreclose. Therefore, banks require spouses, even though separated and never intending to occupy a home, to sign the mortgage. They do not require them to sign the note. This gives the bank no question they can legally foreclose if they need to.
If a separating spouse wants to buy a house, they will have to ask the other spouse to sign the mortgage, thus protecting the bank’s right of foreclosure. This does not give the other spouse any title to the house and does not give them any liability on the note. (Technically, it might provide some argument in a divorce case regarding the property, so any such purchases should be checked out with counsel beforehand.)