Don't shoot the messenger, that's just how these things are.
And it actually is possible to put all the light and dark mode stuff into one place and switch on the fly without any additional downloads but then people would complain about having to download stuff they don't need on their end. And if the site showed different images depending on light and dark they would again be able to figure it out.
Most of these APIs were added when more and more applications were built on the web. You can even access USB-devices from the web.
I'm not saying these things are good. Just that there definitely were reasons beyond telemetry for creating them.