The real reason macOS and Windows are easier to distribute software on is because there's only one Windows and only one macOS. "Linux" is not an operating system, Ubuntu, Arch, Fedora, RHEL, etc. are all different operating systems that just so happen to share a kernel and a similar ecosystem of open source software. So compatibility between them is more of a coincidence than anything else.
Luckily nowadays we have Flatpaks and AppImages, which both solve the problem of simplifying app distribution and installation universally for all distros. Although devs will probably get a lot of hate if they only distribute their app as a Flatpak or AppImage and don't also offer tarballs/debs/rpms...so app distribution is likely to remain complicated for a while.
Linux distros have a complex network of dependancies, config files, and general crap that requires sophisticated tooling to manage which is different on different distros. All to save a few kb of storage space.