The usual behavior for package installers in my experience is it checks for missing dependencies, lists them, then asks if you want to install them. If you decline it cancels the installation of the initiating software. If you want to auto-install dependencies you run the install command with a flag.
Aside from security concerns, it certainly violates the principle of least surprise to not throw a confirmation prompt by default.