Banks borrow funds due immediately and lend for many years
As long as inflows exceed outflows, it doesn't matter what you do with the money, like any Ponzi
If net outflows are slower than the rate at which loans are repaid, this also works
But as soon as people want their money at a rate faster than the bank's return on investment, the bank is doomed