It's popular everywhere. The Go ecosystem, or Rust ecosystem, as an example is just as bad about this as the JS ecosystem. There is a difference, but it's a constant factor. Asymptotically, everyone is just pasting code they found on the internet into their app. Crazy, but true.
That's why a per-library sandbox model seems so beneficial.
In almost any other CS field you would be crazy to use non-vetted third-party code and depend on external service providers for your code to simply run.
I can only think of draconian DRM, which puts things in perspective...