Yes they do need them, because they are cheap and long term (technically they are overnight but in practice, banks and regulators assume limited retail run-on-the-bank, so they are effectively long term liabilities).
If you don't have deposits, the only three ways a bank can fund are
a) issuing term wholesale funding (i.e. issuing bonds, no liquidity risk but expensive, if not uneconomical),
b) short term wholesale funding (money markets, cheap but dangerous, what happens if the wholesale funding market dries up like in 2008?). Banks are now prevented from taking too much of that risk by the introduction of the LCR ratio (which requires them to keep in liquid asset the equivalent of a 30 days bank run) and the NSFR ratio (which forces banks to maintain as much long term (>1y) liabilities than long term assets),
c) and the "originate and distribute" model, i.e. make some loans and resell almost immediately them through securitisation. Though banks are now required to retain much of the credit risk and are therefore limited in how much they can do that by their capital requirements.
And yes, your deposit has been lent out, at least 70-80% of it. That's because everyone assumes not all retail customers will request their money back the same day (and if they do the bank is dead).
The continued threat of bank-runs is the central absurdity of our monetary system. "Everybody keep your money in the bank because if you don't, bad things will happen!"
Personally, I think the only significant disruption would be that enterprises, instead of only having to get buy-in from bankers, would have to sell the public on direct investment.
Though I've been known to be an economic stick in the mud.
Why is it absurd? If all the creditors of any company decided they wouldn't roll their credit, and no new creditors would come along to replace them (ie, in effect a bank run), any company would default. It's not some unique thing to banking. It just tends to rear it's head more often in banking because banks are more levered than most other companies, and the nature of the agreement with creditors (you can call in your loan any time) means it can happen fast.
But that's the thing with deposits, people treat it as cash and don't even think of the credit risk. Companies are free to offer investments to the general public right now, but it is also heavily regulated to make sure that investors understand the risk they are taking. Banks do not have to at the expense of tens of thousands of pages of regulation in every jurisdiction (and that's probably low estimate).
No, they don't do that because "they have been lent out" makes no sense. You give them money and then you are a creditor of the bank. There is no special place for "your" money, ie "they" isn't a thing. It's just a giant bucket of money they now have.
Of course they need the money to fund loans. The money lent by banks doesn't come out of thin air. The bank has some equity (A) contributed by the shareholders and they borrow money (B). They can lend out A+B. That's it. They borrow it from several places, and the cheapest, stickiest way to borrow it is deposits.
There is no magic in banking. No money comes from the sky. The second you think "money is being created" you are going down the wrong path from an understanding perspective. When people who actually know what they are talking about say "money is created" they have a different definition of "money" than you do.
They might use them for funding but that doesn't mean they actually need them.