One of the purposes of the FDIC is to : protect people's money in case a bank folds.
Bank is also a from of business, which mean banks are also exposed to the risk of bankruptcy. In case that happen, FDIC will make sure that people won't lose their deposit amount to the bank and make sure that they're getting it back.
Hope this helps