I'll basically repeat my comment from below, but ergonomically set up displays meet ambient brightness, but don't exceed it (much). If you're sitting in front of a display set to 80 % brightness (~300+ cd/m²) in the evening, you're simply holding it wrong and compensate by limiting the content to dark tones only, which is a crutch at best.
That's not to say people shouldn't use dark themes. But if the reason for choosing a dark theme whenever possible is mostly "white is so bright it literally hurts my eyes", then the environment is decidedly wrong and needs fixing.
Example: https://www.prad.de/wp-content/uploads/2020/07/lg-34gn850-ko...
Get the URL from here, maybe: https://en.wikipedia.org/wiki/Display_Data_Channel#External_...
This is true in a world where many UI backgrounds are close to "white", i.e. maximum brightness. That in itself is an unfortunate situation (though driven in part by the technical limitations of display technology until now) because there are plenty of cases where you actually do want the ability to display above ambient brightness, just not for what is meant to be a neutral background. HDR displays are designed for high peak brightness and shine with photorealistic content - pun intended.
Content such as games, video, photos all have in common that their colour/brightness histograms are much less skewed towards the extremes than typical UIs which are dominated by large uniform, mostly bright areas. Those should be limited to ambient brightness, and ideally on a true brightness plane, not clipped to the faces of an RGB cube.