Mostly, there's a large amount of CSS that has been written over the years that assumed it was on a light-colored website. In mediawiki itself, in mediawiki extensions, in gadgets and userscripts, and in site-specific overrides across all the Wikiprojects. Most annoyingly to deal with, sometimes hardcoded into pages -- table formatting on wikipedia is often using inline styles to get specific background colors, for instance.
You can see a few hundred tickets about dark-mode related issues if you're curious what's been done and why it's still in beta: https://phabricator.wikimedia.org/maniphest/query/8zofdVSnra...
(I work for Wikimedia. I didn't work on dark mode, beyond a few minor adjustments to components I do work on to be compatible with it.)