I have used Windows, Mac OS, and Linux (Ubuntu, Redhat). On the Mac OS, installing a new application (in most cases) only requires copying it into /Applications, whereas in Windows, the installer copies files all over the place. In Linux, make install or the Debian installer also copy files into many different folders.
Is it because Mac software is mostly self-contained? Or is it because the OS is so clever that it handles the dependencies under the hood?
It’s just a choice in how dependencies are handled, not any magic done by the OS itself. Self-contained applications have the advantage of dropping dependency issues and simplifying application management (drag and drop!), but bring with them the price of bloat with needing to bundle libraries and other dependencies with the applications. In addition, one needs to be diligent in the updating/maintenance of the applications so that issues such as security flaws can be corrected (a task that is somewhat simpler with a package manager).