This desire for liquidity on the one hand and long-term lending on the other is intermediated by the financial sector and the banking sector in particular. But the maturity transformation this entails exposes the banking sector to liquidity risk.
If all the depositors wanted their money back in a hurry, the bank would not be able to meet that obligation without either calling in their loans, which may be contractually impossible, or trying to sell them.