What is a sort code? I don't think the US or Australia have the concept. It's weird to me that people would have the same account number.
The accounts used to be a single account at one financial institution. It got bought by a larger financial institution about ten years after they were married (this was their first joint account as a couple). Fifteen years after that, the bank split apart into three regional banks. The routing number changed with each corporate change but the account number persisted. In the last split, some customers who had property mortgages were “retained” by the divesting bank and “acquired” by the divested one.
Thus, two identical account numbers, different routing numbers.