What you're asking goes to the very heart of whether or not the bank had a right to sell the mortgage in the first place. If they couldn't, nobody would have bought them, as the purchaser would have no contractual rights.
This is one of the very first steps checked in a due diligence of loan sales.
I have to admit when it happened to me (sale to vulture fund, that is) the first thing I did was check my mortgage contract on the off-chance it didn't have an assignment clause, but sure enough there it was. I don't recall it registering with me when I signed originally, and I doubt my solicitor raised it either at the time. I'm no legal expert by the way, but have signed many, many contracts over the years and as I said it's a very standard clause.
It also crossed my mind there may be an issue over data protection, and I did some research at the time but came to the conclusion pretty rapdily there was no issue there either. See the link I posted earlier. All that's happened is that another organisation has taken over the same data used for the same purpose - this happens all the time in a variety of contexts.