You can have assets on chain that can be used as collateral which can be liquidated if a loan isn't paid back. Additionally lending money is not only done so people can borrow from it. For example decentralized exchanges need a lot of liquidity in order to execute trades without very much slippage. You can provide liquidity to them and they will pay out transaction fees to you in exchange.