I'm guessing that Bank B uses a special indorsement that identifies the institution holding the account receiving the deposit, rather than itself. Else, there would be no "trail" back to Bank A.
A return to Bank A in such circumstances is actually preferable, since it protects Bank A from loss by giving it notice of the return sooner than possible if the check were returned to Bank B and Bank B had to notify Bank A of the charge-back.
_________________________
John S. Burnett
BankersOnline.com
Fighting for Compliance since 1976
Bankers' Threads User #8