If you are like most people, you probably assume that your bank operates essentially like a safe, it is just a big vault that stores the money of its customers in their own little personal compartments. They charge you a fee for this storage, and that is how they make money.
Perhaps there was a time in history when this description of what banks do was accurate; but that was a long time ago.
Today, banks are gambling institutions, making bets with your money. That is how they make profit, and that is how they go bankrupt.
The first thing you should know is that when you deposit money in your account, it ceases to be your money; it belongs to the bank.
Legally, every time you put money into your account, what you are doing is giving the bank a loan; more specifically, an unsecured loan. It is considered “Unsecured” because you have given the bank your money without requiring the bank to give you any collateral against the loan.
You didn’t know your automatically deposited paycheck, or the money you deposited to save for your children’s college fees, were loans, of course; silly you.
This means that, while the bank does legally owe you the money, it is up to them whether and when and how they pay you back.