Earlier quoted context omitted.
The S&P typically returns 10% YoY. 7% per year is the historical average adjusted for inflation: https://www.investopedia.com/ask/answers/042415/what-average...
You can't perfectly time your retirement to match the S&P 500 average. That's the reason your portfolio shifts to bonds as you get older. It's the reason everyone quotes 7 & 8% as reasonable long-term returns for your retirement portfolio.
Some would end up lower but some would end up higher.
Nothing is guaranteed, but neither is a job.