People say that. Don’t call out the bad examples (there are some!). The never mention the good examples?
    ioQuake3 - still work's
    CS2 - still works
    HL1, HL2, CS1,CSGO - still works
    Unrailed - still works?
    UT2003 - there it is getting hard, unmaintained since ca. 2003. But it is doable if you want it.
    Quake3 - same as above.
Most bad ports were made by inexperienced developers. And honestly, these people need to learn! Especially Windows developers which aren’t Linux users are causing the  problems. Linking weird 3rd party libraries which aren’t itself is a receipt for disaster. Which indicates planing mistakes in early stages. A bad sign is when they start to package for specific distributions…run as fast as you can.I would look to applaud the high quality work id and Valve or Daedalic. Weirdly Microsoft ships a port of Minecraft. Valve now ships the Linux-Runtime to ease ports. And Flatpak allows developers which want to package itself (weird hill to die on…) doing it.
It's about the quality of the port or whether the original software was written with portability in mind?
Take Quake for example. It's highly portable ( I remember playing on Irix ( Silicon Graphics workstation OS )), Carmack wrote highly portable code.
Don't forget all the opensource ports/engine recomps that (still) work great on Linux:
- OpenJazz (port of Jazz Jackrabbit)
- OpenOMF (One Must Fall 2097)
- OpenMW (Morrowind)
- Devilution X (Diablo)
- SDLPoP (Prince of Persia)
- RVGL (Re-Volt)
- R.E.L.I.V.E. (Abe's Oddysee)
- Ship of Harkinian (Zelda OoT)
- 2Ship2Harkinian (Zelda Majora's Mask)
- Super Mario Bros Remastered
... and probably lots more that I missed out.
Most of these are actively maintained though. Older ports, such as UT2004, still work but a few upgrades give a much better experience: SDL2-compat (and now SDL3-compat) really helps, as it brings compatibility with newer APIs (pulseaudio, Wayland, newer controllers, etc).
Please use SDL when targeting Linux!