But then they notice they cant build a dark mode and end up reinventing it all poorly. I've come to the conclusion that 99% of the time "technical debt" particularly in old stable code that hasn't been touched in years is translation for "Its complex and I don't understand it". Particularly when asked to add what seems like a trivial feature.
SOS as always, the new guy knows better than the old one, but by time time all the edge cases get reimplmented it consumes 100x the ram and runs 1/10 as fast and is just as unmaintainable, if not worse because now its written with 20 layers of OO or functional abstractions in some interpreted language that is a giant mess. Which is why when the next new guy joins its all "garbage code".
Sometimes KISS is best, and it should generally be a requirement that before your allowed to throw the code away you have to refactor it a couple of times.
It's not like they can just throw this stuff away anyway. The theming support is everywhere throughout the API, and since Microsoft is a backwards compatibility company, they can't just change APIs incompatibly because that inevitably breaks existing software.