Because an ELF shared library has, like an executable, several segments: often a "text" read only segment (which is mmap
-ed shared, so all processes using that segment share some physical RAM), and a "data" read write segment (for static or "global" variables, and perhaps also the PLT...), private to each process.
This is explained in great detail in Drepper's paper: How to write a shared library