Explicitly working on hardware pixels is hard, and it should be hard (though, I agree, it should not be impossible). There are, like, maybe two types of application that legitimately need to address screen pixels, and these types of application should be forced to implement some kind of abstraction inverter to calculate how to do that given only a slight amount of information.
The web should be future-proof, and that’s what resolution independence is for. By making CSS pixels resolution-independent, every site that declared a size in pixels is getting resolution independence for free. If addressing hardware pixels were made easy, we’d just end up in the same mess as we did when everybody assumed a pixel to mean 1/96 of an inch: UIs that are short-sightedly designed for a class of screen that will go obsolete in 5 years, leaving the entire UI broken and miniscule.