There’s also an element of large companies working on many different things, and the more you silo projects the more people you need because many projects end up duplicating work.
You also don’t necessarily see the output of teams at large companies, potentially for years, so you see large numbers of people working but there’s no external/publicly visible product.
But then you also have “we’re successful right now so let’s pretend that the current growth rate will continue forever and hire accordingly” which is mismanagement that eventually needs to be corrected.