The amount of money that John deposited, not all of it went to the bank.
A part of it was given to the RBI (Reserve Bank of India) by the bank.
This amount is decided by the Cash Reserve Ratio (CRR).
So if the CRR is 5% and John's deposit is Rs.20,000, then Rs.1,000 goes to the RBI and the rest of it goes to the bank.
Now, the bank has money and can start earning from it. To do so it gives out loans.
Considering that the bank gave out all the money it had in the form of loans to people, it won't have anything if John went back to withdraw his deposit.
In order to avoid this situation, the bank invests some of the money in liquid assets such as bonds and gold.
The amount to be invested in liquid assets is decided by SLR ( Statutory Liquidity Ratio).
).So if the SLR is 20% then the bank invests Rs.3,800 in liquid assets and the left out amount is used for daily expenses or giving out loans.