Strictly speaking, the contract isn't "sold": one of the parties assigns it to another (new) party. In a mortgage contract, there are clauses relating to the right of one party to assign it to another party. That is, ABC bank can assign their part of the contract to XYZ bank (or indeed XYZ vulture fund). XYZ then has all the rights and obligations of ABC: the contract itself remains unchanged, other than the idententity of one of the parties to the contract. There will be a seprate contract between ABC and XYZ that says "ABC agrees to assign this set of mortgages to XYZ if ABC pays XYZ a certain sum". There's no change needed to any of the original contracts. Assignment of contracts is very common.