Setting the same files location on all distro wouldn't magically make the applications portable or solve issues with dependencies which are rarely due to file location but rather to version (i.e: an application expecting openssl 1.1 while the distro offers version 1.0). Also not all distributions compile the libraries with the same option. For example a distribution could compile a multimedia library without AV1 support and thet application needs the library with AV1 support.
It wouldn't make the different package formats interoperable, you can make .deb, .rpm, .eopkg, ... packages for applications with the same files location, it wouldn't magically make these packages working on other distros.
Last but not least, it woul kill innovation. For example, Solus borrowed the stateless package concept from ClearLinux. this wouldn't be possible if everyone had to use the same paths. Solus (try as much as possible) to not use /opt
or /usr/local
to make things easier. This wouldn't be possible too if everyone was forced to use the same.
And the different linux systems have different needs and constraints, there isn't only the desktop but also the servers, embedded devices, etc... All it would do is making the system even less flexible than Windows (although it's not common, you can install it on the D:\ drive, move or rename the "Program Files" folder somewhere else, etc...).
Last but not least, the filesystem hiearchy is standardised and distros usually follow the standards.