Distros like Debian/Ubuntu use architecture-specific directory structures (like /usr/lib/x86_64-linux-gnu) which we cannot hardcode/guess, so we really need to search the default paths.
Distros like Debian/Ubuntu use architecture-specific directory structures (like /usr/lib/x86_64-linux-gnu) which we cannot hardcode/guess, so we really need to search the default paths.