Due to technology, the old use case of banks is mostly obviated. There is no technical reason everyone should not just have an electronic money account at the Fed itself for receiving and sending money. And earn the federal funds rate directly rather than have it go through a middleman who is basically just operating a database.
And lending does not have much to do with receiving people’s cash deposits.
>There is no technical reason everyone should not just have an electronic money account at the Fed itself for receiving and sending money.
Yet you complete leave out the non-technical reason why that's a terrible idea.
Systemic Single-Point of Failure, extreme vulnerability political exploitation, no robustness or process/partition based discorrelation to stave off or slow down financial contagion.
Robustness is entropic. It uses more energy, but gains in it's ability to remain up in the face of a myriad of quantifiable stimuli instead of falling apart at the slightest touch.
All eggs in one basket is a bad idea. No one makes a good enough basket.
There is an opportunity cost to letting that money sit and not work, and therefore companies trade use of money now for a gain later (lending money or investing).
The more successful, the larger the pile of money and more likely to look bankish.
Every successful company eventually becomes a bank. See also Apple.