Most Linux distributions at least keeps package assets tracked (easy enough, given that packages aren't much more than a tarball that's extracted to / and a few scripts, and installation paths being relatively standardized). User configuration data is another issue entirely (edit: as are self-built programs, you need to keep the original build folder around and hope that the authors have made `make uninstall` actually work).
In contrast, Apple only follows the convention that a package's assets should be in /Applications/AppName.app... but apps are completely free to ignore that and install to anywhere not being protected by SIP, or to install LaunchAgents and whatnot without having to document that anywhere. That in turn means it's impossible to fully uninstall an Apple program that uses any of these features, and in addition macOS shares the same issue as Linux regarding user configuration data.
And Windows is the worst of the mess. It's essentially a free-for-all outside the Microsoft store, MSI (aka MS's attempt to copy Linux packages) is decent but tedious to package so you'll usually only find it used in enterprise software which needs to be packaged in a way suitable for deployment via GPOs, and on top of file cluttering Windows adds the Registry to the mess. Oh, and the bloatware of anything not installed from a Microsoft install medium.