Many people have non-JS backends and only use npm for frontend dependencies. If a postinstall script runs in a dev or build environment it could get access to a lot of things that wouldn't be available when the package is imported in a browser or other production environment.
mdavidn|5 months ago
brw|5 months ago
EDIT: oh I scrolled down a bit further and see you said the exact same thing in a top-level comment hahah, my bad