Ever tried to uninstall an antivirus on windows? Or any program that does not want to be uninstalled? I've had programs whose uninstall.exe was no different than /bin/true.
On this point, Windows is no better than macOS: the OS relies on the goodwill of the developers to provide working uninstallers. The only protection is a world where the OS provider does the application packaging: Linux repositories, Mac App Store, Windows Store. And even then, apps are still free to litter your filesystem at runtime, unless they're heavily sandboxed. Then FlatPak it is, or iOS apps or Android apps. Not great.