I can answer that, since I'm using Compound (and Uniswap).
To start with, they lend out at interest, which is paid by users, for the same reason anyone would take a collateral-backed loan, knowing they'll have to pay interest. It could be speculation on sh-tcoins, investment in stocks, whatever. The Compound contract doesn't care because they're more-than-fully backed and have a mechanism for liquidation at a profit if the loan/collateral value ratio gets too high.
A fraction of that is then paid to depositors (whether or not they're borrowing against said deposits).
In some cases there are tax advantages in that you can avoid selling crypto while converting it into a different asset you'd prefer to invest in.[1]
They also allocate Compound tokens (COMP) to depositors and borrowers (that's the distribution yield figure you see). While COMP's value is highly speculative, its grounding (for whatever that's worth) comes from the fact that the tokens entitle you to vote on changes to the Compound contract[2], which some people apparently value and are willing to pay for. You also need a minimum number of tokens (100,000 IIRC) to submit proposals.
I don't know their process for deciding the distribution yield, but it sometimes leads to weird situations where it's higher than the interest rates for borrowing, meaning that (modulo fluctuations in the rates and value of COMP) you're being paid to borrow it. See, for example, the yields on Basic Attention Token (BAT) [3] -- 10.23% dist yield vs 3.84% borrow rate.
As things stand now the interest on borrowing ETH is about the same as its borrowing distribution yield, meaning you can effectively borrow for free (again, modulo those fluctuations). I starting doing that to convert BTC to ETH that I use in Uniswap liquidity pools, which make money as automated market makers, taking a cut of conversions between cryptocurrencies.
[1] Though, until the IRS clarifies, it's an open question whether putting up your crypto on Compound etc for these loans is a taxable event, as it's booked on the blockchain as conversion of e.g. Ethereum (ETH) to Compound Ethereum (cETH). I think that it should (obviously) have the same tax consequences as taking a loan at a pawn shop with your gold chains as collateral (i.e. there's no sale unless/until you default on the loan, in which case you have sold it for whatever amount they lent you that hasn't been paid back).
[2] https://app.compound.finance/#vote
[3] https://compound.finance/markets/BAT