I have done bluesheet reporting code for another large bank and it is one of the most tedious things you can ever do in software. It's a report of all the trades that the bank does and the SEC can come back and ask for historical data at any point of time.
So there's a huge database with feeds coming in from multiple trading systems. Usually these feeds have to be enriched with the right account numbers and so on. This needs lookups to other reference data systems, which frequently are changing because of changing regulations, growing businesses etc. I am not surprised this bug remained undetected for more than 15 years. The guys who coded this initially are probably long gone and nobody did knowledge transition of the fact that some account ranges are not test accounts, even though they look like test accounts.