At some point there needs to be some trust, and NPM puts that boundary at installation. If you trust a package enough to install it, then it's allowed to act on your behalf with the permissions of your user.
`npx` doesn't change that dynamic. It's no different than installing an RPM or Debian package over the internet.