Unless i am badly off the mark, ld will use soname to tell lib v1.0 from v1.1 or v5.97. But the problem is with package manager flatly refusing to have anything to do with installing multiple lib versions side by side.
That is, if they have the same package name. End result is that one distro use glib3.xyz to designate glib 3.x, while another use glib-3.xyz Yet another use glib.3.xyz.
They all hold the same files, but for the package managers they are different packages. And will resolve dependencies based on that.
Applying containers and/or sandboxes to this is a Will E. Coyote solution...
So they "avoid" it by insisting on using a specific version for the duration of the distro version.
What the OP probably meant is that none of these solutions are actually a seamless part of the workflow when using the OS.
http://mupuf.org/blog/2014/02/19/wayland-compositors-why-and...
One thing, though: Docker itself presents a privilege hole that can't be easily plugged, too. That's a large part of why I've expressed alarm upthread.