npm is a good example of the "buy vs build" idea, although npm modules are mostly free of course. Why write code when you can just call someone else's? But then you get problems like the left-pad fiasco
This is probably true for "most of the modules" but not for "most of the modules that people actually use"
I came from PHP, where everyone and their mom would reinvent the wheel.
Then I switched to Node.js, where no one would write their own code anymore.
The truth lies in the middle.
Can I write something like D3 until the dead line hits? Probably not.
Can I write something like left-pad until the dead line hits? Certainly.
Habits often mute common sense.