I have a question: why companies like Twitter need so many people? I'm sorry but it doesn't seem that hard to replicated Twitter functionality and scalability (with the right people on team). What are the engineers actually doing the whole day? Why do they need so many lines of code? All mysterious to me.
It's a fair question, and shows that a lot of these sites are like icebergs - they look simple until you delve beneath the surface.
How are you detecting human trafficing and reporting it (FOSTA-SESTA)?
How are you detecting CSAM and reporting offenders to NCMEC?
How are you detecting and removing spam? How are you preventing fraudulent ad clicks? How do you deal with "whale" accounts (very large follower counts) and returning an algorithmic feed for their followers?
I interviewed for their deveng team and they were doing things like build-caches because it sped up compiles and increased productivity. Also optimising the Scala compiler (more productivity gains).
My experience is that software businesses and teams have an internal pressure to grow the number of software engineers on staff. I have seen three things swirl together to cause that.
1 - During periods of company growth (increased revenue and profits), there is a tendency of leadership to not have their hands on the wheel. You tend to see growth in company "cost-centers" instead of "profit centers." So you'll get new efforts that don't directly contribute much in increasing revenue. Early in my career I wasn't tuned into the need to really build your work and projects directly into profit center activities.
2 - Internally, I have seen people grow the number of staff underneath them as an almost weird way of justifying a promotion (eg, "executive VP mucky-mucks have N employees and I'm now managing N employees, promote me to executive VP mucky-muck").
3 - I have seen smaller companies really focus in on the revenue and/or profit per employee number to guide hiring plans. So during a good period of revenue/profit growth, a CEO/owner-type will say something like "It looks like every engineer I add at $1X0,000 is resulting in $[2|3|4]X0,000 additional revenue or profit - let's just keep adding engineers." These napkin calculations are devoid of deeper market analysis.
If you went one-on-one with every single software engineer at a big tech company or in a smaller org, you probably wouldn't find many who aren't busy with work. You just probably would find a bunch on "nice to have" work instead of real revenue generators.