That’s why they often make good developers.
Good developers don’t just write easy-to-write code. They write code that is easy to maintain and efficient to run - and oftentimes that requires forethought, a willingness to rewrite when a misstep is made, and above all else the willingness to tinker/learn effectively.
Source: I am a terrible developer and a very lazy person, and I have had to maintain lots of poorly-written code (some of it my own).
Epic Games*, Mihoyo**, IO Interactive, Bethesda/ZeniMax***, Deep Silver.
* Epic games is 40% owned by a publicly-traded company, Tencent.
** Mihoyo filed for an IPO in 2017, but withdrew its application for unknown reasons.
*** ZeniMax Media was recently acquired by Microsoft, and is now a Microsoft subsidiary. I’m not sure if this makes it count as a ‘non-public gaming company’ by your definition.