Bank customers use the bank to deposit their money, for business reasons or for security reasons only. Then the bank provides an additional bonus on customer deposits in the form of interest on deposits. Then the funds that have been collected are used to provide loans to other customers, who are burdened with loan interest in addition to the loan principal. Usually the loan interest is greater than the interest on the deposit so that you get a profit. In fact, this is the main income (source of profit) of the bank
Banks are basically business entities whose job is to make profits. So if in the past the bank was able to make a profit during their operational period (from when the counter was open to the counter closed), now the bank can make a profit every time.
Customers applying for a loan from a bank are required to provide collateral as collateral for the loan. Usually the collateral value is always greater than the loan value. If the customer experiences payment congestion (bad credit), the collateral is confiscated by the bank to cover the bad loan. The bank can sell it (auction) or rent it out.