Well, aren't you "loaning" the bank your money when you put it in an account? If everyone wanted to withdraw all the money from all their accounts at once the bank would be unable to pay; you get paid interest because you take on slight risk.
Long-gone are the times when high street banks were based on loaning out the deposits from savings accounts. Building Societies do/did this, but of course the banks bought up most of those too in their spending sprees of M&A to become 'bigger and better'. Well, bigger anyway