Salesforce revenue growth has decelerated from ~24% in FY 2021 to just over 8% for the trailing 12 months.
A company that was tuned to double revenue in 3 years transforming in one expecting to double in 9 years is definitely carrying too many people. It made sense for them to reduce headcount to align with their much slower growth curve.
Side note: Benioff also said earlier this year that they were done hiring programmers because AI. I'll let their careers page put the lie to that.