Usually just removed from sale, I haven't had any games outright removed from my library.
However there have been many cases where developers pushed an update that removed content, which is really the same problem. You can't play GTA San Andreas or GTA 4 with the original soundtracks if you purchased them on Steam!
https://www.pcgamer.com/grand-theft-auto-san-andreas-steam-u...
https://www.polygon.com/2018/4/27/17292836/gta-4-soundtrack-...
This should be illegal.