It's odd to use npm packages as an example of anything worthwhile. They're a mess. For a while, morons were making npm packages containing a single trivial line of code, and there were Node developers stupid enough to use them. Linux, the GNU utilities or even bind would have been less problematic examples.
As for the invisible hand, it was an expression first used by Adam Smith (the real one, not the knobhead crackpot who later assumed his name) to just say "huh, it just kinda seems to pan out somehow." It has never been rigorously shown to actually work. And all the various known modes of market failure make it probable that there is no self-correction at all.