Yeah but "dark mode" for Win3 through WinXP was primarily to support passive matrix LCDs, which required inverted color schemes to appear with enough contrast to read. That is why the built-in "high contrast" color schemes look so aggressively awful.
Yeah, when dark mode became "a thing" my first reaction was "...didn't we have this already?"
I was a theme junkie back in Windows 98 times, but stopped bothering since it became increasingly clear that Microsoft was not really interested in supporting them after XP.
Custom painting isn't the only thing that broke it. You can customize the style (colors) of the native widgets to get a desired look but IIRC you could choose from system colors (follows the theme/mode automatically) or exact colors. Some applications used a mix of them which made the UI look awful if you switched away from whatever the default theme was.