There's a very good chance that the bank that underwrote your mortgage won't be the lender when you finally pay it off. In the 21st century, banks not only buy and sell mortgage loans like stock shares, they buy and sell each other. In a foreclosure, you may have to face the successor of interest rather than the original lender.
Successor in Interest
Taking title to a house requires paperwork and so does trading a mortgage. If your lender assigns your loan to another bank, there's supposed to be a paper trail. When one lender just buys another outright, the buyer isn't going to take the time to assign every one of hundreds or possibly thousands of mortgages. Instead, the bank becomes the successor-of-interest on all of them. The term refers to one business that assumes the rights and responsibilities of another.
Why It Matters
The successor in interest has all the original lender's authority over your mortgage. The successor gets your monthly check, and if you fall behind, it has the right to foreclose. When Bank of America bought Countrywide, for instance, all of Countrywide's mortgages became Bank of America mortgages. This matters because a bank can't foreclose without a legal claim on your house. Even if you're months behind in payments, a lender has to have legal standing to launch a foreclosure.
Proving Their Case
The 21st century has been rife with cases of banks foreclosing on homes they don't hold the mortgage on -- and never held a mortgage on. No surprise, then, that mortgage paperwork has come under heavy scrutiny in multiple foreclosure cases. After a mortgage has been assigned multiple times, the paper trail may no longer be solid. Courts have ruled, however, that if the merger or buyout goes through legally, it doesn't hurt the successor's rights to foreclose.
Just because the bank is the legal successor doesn't guarantee the foreclosure is legal. It's quite possible many of the mortgages it now owns have been assigned and reassigned multiple times. If the paper trail has broken down along the way, the successor may not be able to prove a legal claim. It's also possible the original or successor lender violated some other rule in the foreclosure process. Successors in interest are as vulnerable as any other lender to such defenses.