Originally, money is a IOU and basically a tool to trade between communities. The individualization of capital (capitalism basically) made place for private loan and artificial middlemen like i wrote in the previous comment. And yes, you can work without it, but this is the way things works in the west since the 18th century, 17th century in GB.
------------
To be clear about how banks work: they don't loan money, they create it via accounting. You go to a bank and ask for 20 money at 10% interest, they will write in their asset column "20 money" and in their liability "20 money", give you the newly created 20 money and create a "coupon" of 2 money (sorry that's the french word, i don't know how englo people call that). If needed (like a liquidity crunch), they can sell the coupon worth 2 money at 1 money, or even your loan worth 20 money 18 to another bank, but they will keep the liability in their own books. If the liability become higher than the assets, bankruptcy. Notice that the money you put in the bank isn't touched.
The money you put in bank, they invest in low risk assets like government bonds, through their investment funds. Since those are locked assets, if too many people want their money back at the same time, the bank enter a liquidity crunch, have to sell the locked assets at a discount, and put the losses on their own funds, in the "liability" column.
Wether it's caused by a credit crunch or because loans aren't being repaid, if a bank "liability" column has a higher value than its "assets" column, they enter bankruptcy. The state auctions customer-linked investment off (i think that's more complex and depends on the local laws, in my country you have a transfer provision where the customer and the bonds linked to some of his bank accounts are transfered to a new bank) where those are slowly sold at a higher value than the failing bank would have gotten, slowly reimbursing the customers. It is _very_ rare that bank customers loose any money in the long run (they do suffer opportunity cost though, their assets are locked and don't earn any interests, so in a way, they loose a little). in the 2007-2008 crisis, the issue is that banks split loans weirdly and did a lot of accounting shenaningans tying each international bank to each others.