You do realise that the money isn't just sitting there in vast piles in a bank vault? It is used by the bank to invest in stocks / shares / bonds and as loans etc.,
They will give the depositors a certain percentage of their profit for investing it in their bank and the rest will be profit for the bank itself. Fairly simplistic description but that is how all banks work.
As long as the initial money is legally gained and isn't as a result of illegal tax evasion rather than legal tax reduction then there isn't anything wrong with it.