That of course does not include Drupal modules - there is, similar to the Wordpress ecosystem, the really bad stuff.
I can see the advantage of it, you just focus on the core and let the world take care of its own problems but you end up with nearly every site being critically dependent on a couple of obscure modules that will not get the attention they need until it is much too late. This coupled with Drupals nasty habit of obsoleting everything every couple of year (I hear they are changing now) and you're set up for disaster.
So even if Drupal Core is not all that bad it is never just Drupal Core.
If you don't do that it becomes a 'find the last hole in the cheese' exercise and very likely there will be many holes that you don't find that way that would not have been there in the first place had the whole thing been designed from day one with that in mind.
On the whole I think 'let amateurs build it and experts vet it' is better than just 'let amateurs build it' but it doesn't come close to 'let experts build it and experts vet it'.
Also: https://www.lullabot.com/articles/why-paid-drupal-modules-fa...
The correct answer here is that if you don't like Drupal's free & community-focused development model, you're likely better off switching to some off-the-shelf software. Alternatively, you can pay a consulting company to maintain the module, which is how many of them get written anyway (and then given away for free). So if you focus on modules with commercial backing, you've got a pretty close approximation without giving up GPL freedoms.
Wait, are you talking about npm or Drupal? (only kind of kidding)
Seriously. A standard ES6 JS project will run you to actual hundreds of packages. Thats a huge attack surface.
With Drupal, on the other hand, I've always had to install a whole bunch of contrib modules just to get the basic functionality I needed. Has that changed significantly since Drupal 6 and 7?
Am I underestimating how insecure Wordpress core is, even considering that the get the equivalent you'd need Drupal plus a whole bunch of modules?
No, it's known for its ridiculous number of security issues and sloppy code :/