Everyone can create money; the problem is to get it accepted
-Hyman Minksy
You're correct. Banks, through the process of extending loans to creditworthy customers, create deposits. Commercial banks are licenced by government to be deposit institutions. This means they have certain priveleges such as holding reserve accounts with the central bank and being able to create bank deposits denominated in the state unit of account (eg. USD, GBP, etc).
One way of looking at money is as debt. If you spend a paper note, you are exchanging liabilities of the government (Treasury in some countries, the central bank in others - both are part of the government). The recipient of the paper note accepts it as payment, not just because it is decreed as legal tender, but because it can be used to settle tax liabilities (i.e. returning the government's IOU).
Why would money be destroyed simply through the process of paying back a loan?
When I seek a loan from a bank (often to fund investment or asset purchases) I exchange my IOU (my liability) (eg. mortgage agreement with my signature) for a deposit asset. The bank holds my IOU liability as its asset and I hold the bank's deposit liability as my asset. New broad money is created in the process but the net change in financial equity across both parties is zero. The bank's balance sheet simply expands, as does mine. We both have new assets and new matching liabilities.
When the principal of my loan is repaid, I am returning the bank's own liability (newly created deposits) back to them in exchange for my own IOU. The contract and debt is extinguished/redeemed and neither of us have residual financial claims on each other vis a vis the loan agreement. The bank cannot go on to spend its own IOUs.
In the modern world, the bank will digitally credit a positive balance in your deposit account when you take out the loan. Upon loan repayment, the bank will digitally debit this balance. It is literally the same as you entering a number in an Excel spreadsheet and then proceeding to delete this entry a short time after.
Interest that the bank charges you on the loan does form part of the bank's income statement. Interest earned on loans (less interest paid out on customer savings) forms a large proportion of a bank's profit and is their primary business model. They use this interest money debited from your account to fund operations and retained earnings for shareholders, etc.
If I was a bank and could create money freely at my will, what would keep me from simply handing out loans to everyone?
Commercial banks are constrained in deposit creation in several ways. The Bank of England published an excellent paper in 2014 describing these in detail but I will summarise.
First and foremost, a bank cannot create new money if nobody is demanding credit. Customer behaviour and demand for loans in the economy therefore prevent banks from unilaterally creating excess money supply.
Credit demand can be influenced by the cost of credit - i.e. the interest rate banks charge on loans. This rate is largely dictated by the central bank's policy target rate. Increasing the policy rate forces banks to increase how much they charge on loans as banks must stay profitable. Customers are less likely to want to take out loans if the rates are high, so this constrains new money creation.
Additionally, banks face competition for customers. If they lower their loan rates to attract enough customer demand for credit to create lots of new deposits, they are squeezing their profit margins. This is because they must attract new customers who bring with them new reserves for the bank. To do so, they must increase the rate they pay out on savings. This interest spread squeeze constrains money creation by banks.
Furthermore, another customer behaviour can effect the net creation of broad money by the banking system. If you take out a loan, you will likely spend that new money. The recipient has a choice. They could use that income of new money (from your initial loan) to either buy further assets or goods and services, thereby prolonging the creation of new broad money, or they could pay off their own debts with their own banks. The latter would mean no new money is created in aggregate by your bank's initial loan to you.
There are also regulatory constraints on bank money creation. While there are actually no reserve requirements in many sovereign nations (the US reduced their reserve requirements to 0% in March 2020 and the UK did so fully about 14 years ago), captial ratio regulations and other credit risk requirements prevent banks from creating too much new broad money by scoping what it means for a customer to be credit-worthy and by defining what a bank must hold in capital stock before lending.
Also, if there weren't any minimum reserves, what would be the consequence for the economy as a whole?
As stated above, most modern economies no longer have any reserve requirements. This, as is self-evident, does not pose any catastrophic issues in the monetary system. The central bank plays a vital role in ensuring all payments are cleared and settled at par in a timely manner so will always ensure sufficient reserve liquidity is in the commercial banking system to facilitate millions of transactions each day. They act as 'lender of last resort' (pg 12).
Why do banks want people to open an account with them?
When a new customer deposits money with a bank, that money is coming from somewhere. If it is coming from another bank, liabilities and assets of the banking system as a whole don't change. Bank A's liabilities (customer deposits) are debited and Bank B's are credited - the mediation between the two is a debit and credit of Bank A and Bank B's reserve accounts at the central bank respectively. I.e. Bank A's balance sheet contracts and Bank B's balance sheet expands. The result of Bank B gaining a new customer deposit is new reserve assets come with it. These reserves reduce the need to pay for reserves from elsewhere.
If the new deposits come from a customer placing cash currency with a bank, the banking system's balance sheet as a whole does change - it expands as the cash you give to the bank is often swapped for bank reserves with the central bank and the bank will credit your new deposit account. This has the same effect though - new customer deposits with your bank bring new reserves with them. Remember, loans create new deposits but not new reserves.
Banks must ensure they settle payments by having sufficient reserves. There is no reserve requirement but reserves are still vital. Banks gain access to reserves via asset liquidation, attracting new customer deposits by borrowing on the inter-bank market at a cost, or by borrowing directly from the central bank at a cost. If a bank has lots of new customer deposits, they also have lots of new reserve balances, such that they offset potential costly reserve borrowing. This reduces the cost of funds for the bank and so improves their financial position.
A key aspect of modern monetary systems I should emphasise is that central bank liabilities (reserve assets for banks and 'base money') and commercial bank liabilities (customer deposit assets and 'private broad money') are completely separate. They do not mix.