Some banks care about collecting deposits because the interest they earn on short term paper is more than the interest they pay on deposits. Some banks don't accept deposits at all -- these are called investment banks.
Also, banks don't really do a lot of maturity transformation -- there are so many myths about how banks operate -- if you look at a bank's balance sheet, you will see a range of short, medium, and long term debt that is constructed to roughly match their short, medium, and long term assets.
Rather, banks make money off of spreads, because banks have lower funding costs than their customers, due to a web of in house expertise, government guarantees, access to special lending facilities and payment networks that others can't access.
If you want to really understand banks, you should stop talking about deposits, which aren't particularly important, and instead focus on mortgages, which dominate the entire financial industry. If you want to buy a house, you could try to sell a bond into the bond market. But a household will have a hard time selling a bond. So they go to a bank, which performs its own credit analysis and then gives you a loan while they sell a bond. The interest you pay to the bank is more than the interest the bank pays on the bond. Banks make money off of this spread, which is small, but it is leveraged, so the total return on capital for the bank is high.
If you don't like it, you are welcome to try to fund your house purchase by selling your own bonds for a lower rate than what the bank charges you. Try crowdfunding your house purchase and skip the bank! Doing that will be an educational exercise that will clarify how banks make money -- it has nothing to do with funny business about deposits, and everything to do with banks having access to capital markets that the Smith household does not.
Most banks basically just break even on the deposits, given the costs of owning all those branches, paying the tellers, etc. Even if they make a profit, it's a small profit, but it's a great way to upsell other financial services (mortgages, auto loans, lines of credit) that make money for the bank, as well as charging fees, etc.
But they don't need your deposit in order lend someone else money, because they borrow from the capital markets at one rate, and lend at a higher rate, and this has nothing to do with borrowing short term and lending long term. Rather, the primary risk for banks comes from leverage.