system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:When a bank goes bankrupt where does all the money from people's accounts go?
gpt
I don't know if this is what you are looking for, but it's important to keep in mind that banks don't just hold onto your money after it's deposited.

In some sense, what you're actually doing is loaning your money to the bank in return for some (admittedly small) amount of interest.

The bank then takes that money, and loans it to other people, in the form of mortgages or other loans, or even invests it (usually in bonds).

They then get a higher amount of interest than what they pay you, and this is how they make money.

A bank probably doesn't have enough money on hand to pay back every account people have opened with them.  In most situations, that's not a problem, because some people are usually depositing money when other people are withdrawing it, and it mostly balances out.  They also have a steady stream of loans being paid back, so there's money available from that.

(as a side note, this is part of why banks close so early.  A large part of their business is not actually dealing with the public, but instead tracking where all this money is at any given moment.  Closing early stops new transactions from coming in so that they can sort through all the existing ones and move money around appropriately.)

To answer your question, when a bank goes bankrupt, it's at least in part because they don't have enough money to pay back all the loans they have taken out, including the savings accounts from individuals.  In a bankruptcy, it's mostly a process of all the people who loaned money to the bank lining up in some order of priority (determined by a court) and taking what they can get.

Banks are also a special case, in that they are insured by the FDIC.  Basically, the federal government has said that it's in our best interest to protect people's bank accounts in the case that a bank goes bankrupt.  They'll step in, and pay back all the balances on people's accounts up to $250,000.  Any more than that, and you'll need to wait in line like every other creditor.