ifIf you want to spend all of your money in the next few years, then a CD protects you from the risk of a bear market. however, if your time horizon is longer than 10 years, then the stock market is a better bet, since it is less effected by inflation risk. also, as you point out average stock returns are much higher, ignoring volatility.
onOn the whole, CD's appeal to people who would otherwise save their money in cash. generally, it seems these people are simply afraid of stocks and bonds because those securities can lose nominal value as well as real value. i I suspect this is largely because these people don't understand inflation, and are ignorant ofnor the historical long-term index fund performance.