Software is complicated. If you keep writing new functionality, maintaining it slows down your ability to write more new functionality. Eventually if you want to ship more new features and not wait an extraordinary amount of time to do so you need more people. This doesn't scale super well so your headcount grows non linearly.
Companies develop a lot of bespoke features used by a handful of their customers. It might not be obvious to the average person what all of those features are. Additionally just scaling software to continue running with more customers using the product is not a trivial task as well. Adding more servers or making servers beefier only works until it doesn't.
> I’m 22 and work on a 3-person team so it’s hard for me to imagine why a company would more than 4 or 5 total employees.
You're not wrong.
I've seen companies with less than 10 employees make around $9M ARR within the first 3 years, and some with around 50-100 employees that can't even reach 100K ARR.
The smaller your startup the more faster you can go, Dropbox's main issue is that they haven't implemented Founder Mode yet. I am willing to bet that that there are jobs in Dropbox that doesn't need to exist.