- Bad compilers (that lacked stdlib features)
- Lacked package managers (so we need to detect versions instead of just specifying used libraries for the program)
- The mess of various nix/linux distros having differing paths (/bin or /local/bin or /usr/local/bin or whatever?) and nix binaries lacked a standardized way to just locate "themselves"
In contrast, Windows programs mostly just make an API call to detect where they live and then just load files from relative paths, this also allows for side-by-side installations of varying versions instead of multiple builds (Yes, some programs sadly needed installers but that's just bad engineering, whilst many programs have portable variants).
Considering Mac programs also are self contained I guess those also have some sane API's for program self-location.
Yes, I do realize that much of the centralization of programs harkens back to Unix multi-user paradigms with centralized management but personal computers has been the norm for some almost 40 years at this point (Even if we've moved to web mainframes instead).