Ancillary service workers always get hit badly, but good salespersons are often safer than good engineers.
However, good salespeople can make a lot of money.
Sales, marketing, HR, admins, PMs, etc. are usually the first to go because they don't "keep the lights on" and it's hard to measure their impact.
While it's true that it's also hard to measure a single engineer's impact, it's scarier to fire someone who may be expensive to replace and who may take institutional knowledge of the inner workings of the product with them.
Also, top-down layoffs tend to target expensive staff with large paychecks, without accounting for institutional knowledge or intangible value delivered.
would it? maybe you are talking about video games and a good enough game would sell itself. But for other businesses sales / marketing / ads do matter. Imagine you provide a 50% better service than your competitors, but you target audience never reaches your page because they are bombarded with google ads of your competitors
If you generate the same number of leads, do you need 300 salespeople to convert them? Or could your top 100 performers do it? Do you need separate salespeople for each product or can one person sell it all?
At the trough of interest rates, big companies had insane numbers of salespeople touching each deal (easily 10+ at some orgs) because they'd over-hired and the forced people to hyper-specialize to justify it.