Ok, here’s the short version - banks depended completely on deposits in the seventies, the age of boring 3-6-3 banking (take deposits at 3%, disburse loans at 6% and be at the golf course by 3pm)
As you’ve correctly pointed out, the main constraint is(was) deposits - banks tend to fight for slices of the same pie as they’re unlikely to persuade new clients to give their savings to banks.
So twenty something years ago the banks started wondering how they can overcome the deposit constraining factor and acquire funds through other means - issue corporate bonds, borrow from other banks etc. Even straight up invention of new capital, which JP Morgan pioneered.
So, coupled with increased leverage, the banks realized they can sidestep the crucial issue - acquisition of funds which costs money (interest that needs to be paid to the depositor) and dramatically increase the disbursed funds (that earn money).
So the banks stopped being solely reliant on money that John Doe puts into his savings account. Some banks (admittedly, mostly investment banks) were notorious for relying almost exclusively on overnight lending for their liqudity (Lehman brothers the most notorious example)
And then, they realized that the disbursed funds - especially if they were AAA loans with a low risk premium and a steady income - can be treated as every other commodity - used as a collateral to borrow even more money, sold, insured etc. And here comes the causes of the 2008 financial crisis.
This changed the branches as well - they main purpose is to sell you stuff - products, services (with associated fees) and funds, through loans on different products such as mortgages, credit cards etc.