There's tonnes of examples backing up your first point though, 100% accurate.
If I remember correctly Shopify is something like 400k lines of Ruby on Rails code and 400 developers (i.e. one developer per 1000 LOC). Whereas I guess a 5k LOC codebase could be handled by a single developer.
That's a couple of weeks work.
EDIT: I'm being flippant, but to me a 400k code base is something 2 devs can put out in a few years. I'm pretty certain the present main code base I'm working on must be close to 400k and it's only ever had 2 devs working on it at any one time.
And we're always adding massive chunks of new functionality, and are regularly integrating with new third parties. And we total overhauled it last year to support i18n and it's now being regularly used in 3 languages and we can add more in literally a couple of days.
Ok it only handles hundreds of thousands of users, but I expect it to be millions within a couple of years and we're not even trying to load balance or anything yet.
1. Many engineers do not work on core products. Many of these companies operate like quasi accelerators at times: hire smart engineers since you can afford it, hire a few good PMs, see what happens, then market the most promising results. Twitter had Vine, Snap had Spectacles, and maybe one of the best examples of this is Amazon. They didn't need thousands of engineers to run an e-commerce site, but they did need them to build out a cloud, and Alexa, and a video streaming service, etc. Other companies want to replicate this model.
2. Scale is hard. As soon as you hit a limit of what off the shelf software or current open source offerings can do, you have a hard problem on your hands. There are certainly more 'web scale' products that exist now to make this process easier for startups, but it can still happen. It's also possible that even if there are products that can scale, it would end up being cheaper to spin up a large team of good engineers to replicate a commercial offering if you're optimistic about the companies growth.