A bank can just magic up an account with $1M in your name, sure, but when you show up to withdraw the money they have to source that currency from somewhere— Their loans won’t be held in very high regard if you can’t then use the loaned money to, for example, pay for all of the various labor and materials you need to build your new house.
That somewhere is the bank’s depositors.