Yes, it's legal, and it is not considered to be a violation of the customer's privacy. It is done to enable the bank to tie the check to the customer's account, so that if there is a problem with it -- for example, it bounces or turns out to be fraudulent -- the bank will know whose to which account it should be charged back. When you deposit any check, you receive what's called "provisional credit," subject to charge back. You receive final credit only when the check is finally paid, which means the bank on which it's drawn has accepted it and made arrangements to transfer funds to the bank that took it for deposit.
Published on BankingQuestions.com 7/28/06