Banks transfer liabilities to there customers who in turn transfer there newly found assets to the stock market.
Banks get a monthly interest
Stocks get more liquidity
You get a combination of assets and liabilities. Your just a middle man assuming that your investments can do better then you and the bank.