I'm not sure the comparison here is entirely fair.
On Linux systems, often most or all of the software being used is installed from the distro packages using the distro's package manager. Usually things go smoothly in this context.
On Windows systems, often most or all of the software being installed is installed using third party installers, which may have their own versions of various dependencies. The Windows infrastructure has to cope with this much less predictable context, and much of the time it does so reasonably effectively.
If you need to build third party software from source on Linux, or do more tricky things like cross-compiling to run on some embedded device, things are often far less pretty. Often you are just trusting that someone's makefile running under sudo won't dump junk all over your system, and that if it does, the uninstall target will tidy up properly -- which, in my experience, is not a safe bet on either count. Even building something from source in the first place on Linux typically depends on system-provided compilers and probably standard libraries, which as we saw with some relatively recent GCC changes can switch ABIs in non-backwards-compatible ways, potentially causing serious problems of their own.
In short, things look much better on Linux as long as you stay within the walled garden of your distro's own package management system. As soon as you need to go beyond that, you're probably in the Wild West.