Let's say you have a company with 10 employees, and a revenue of 50 million. If you hired an extra web designer you could optimize your website and squeeze out an additional 1% = 500k. Worth it!
Times go bad, revenue drops to 10 million. You fire the non-essential designer and take the 1%=100k revenue hit. If you had fired an essential employee, your revenue would have dropped some double digit percentage, so those you have to keep around.
You expand/contract the business to the point where the marginal employee costs you the same as the marginal revenue they can bring in.
Well that's the theory for stable profitable companies. For startups I guess you'd have to think of the marginal expected future revenue.