Inspired by Why buy an annuity contract when you have money to spend?
Take the contract described in that question: you have $100k, and you are buying a contract that pays you $600/month for the rest of your life.
$600/month equates to $7200/year, or 7.2% on your $100k. It's very much possible to make more than 7.2% returns in the market, in fact the S&P500 has historically returned 10.26% per year, so why would anyone buy the annuity contract? By buying an index fund, you both earn more and never use up the principal.
It's arguable that the market is too volatile for this kind of purpose. After all, if the market goes down 30% this year, then withdrawing $600 means you are selling during a market downturn and you might not get your 10.26% return even if the market goes up 50% next year. However, one can still buy a high-yield dividend stock. For example Altria, as of time of writing, has 9.5% dividend yield. That's once again better than the 7.2% payment from the annuity. One could argue that Altria's dividend is not secure, but they've been consistently paying an increasing dividend for 50+ years. It's of course possible that Altria will go bankrupt and not be able to pay the dividend anymore, but it's equally possible that the annuity company will go bankrupt and not be able to pay the $600/month. Plus, this preserves your money regardless of whether you live three more months or three hundred.
Why buy an annuity?