Even if we didn't have post install scripts wouldn't the malware just run as soon as you imported the module into your code during the build process, server startup, testing, etc?
I can't think of an instance where I ran npm install and didn't run some process shortly after that imported the packages.
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.
I can't think of an instance where I ran npm install and didn't run some process shortly after that imported the packages.