I will also agree that if you just erase all the risk from the market due to the downturns, that the market becomes a great investment.
But what's the relevance of that? When the next bubble pops, whether it be in two weeks, two years, or a decade, you and your investments are going to experience it. Some of those red splotches go on for twenty years.
As for why doing "just barely better than inflation" is marked as red, the chart accounts for inflation, but it doesn't account for a time value of money. Putting $1 dollar in the market to get $1.04 back out 30 years later is not a positive investement.
"Yet despite that, the majority of that chart shows returns moderately above inflation, sitting in at around the 4% safe withdrawal rate."
Which is why it is generally not a terrible idea to invest in the stock market.
But this is basically a goal-post move relative to the "common wisdom", which presents it as a done-deal that the stock market is always a good investment that produces a ~7% return every year. It won't matter to you that it tends to generally produce a relatively decent return over 50 years if you are currently, unbeknownst to you, at the beginning of one of those big red areas that may stretch down for decades.
Look at the stock market as it stands today. I will not tell you 100% that we are in such an area; internet commentators have predicted one million of the past 3 recessions. But I will tell you that it's an awfully plausible story.