While there exist selectors to select items preceded (#hlinks+#hsearch) or owned (#topbar>#hlinks) by other items, there’s no way to do the opposite.
For example there isn’t something like
li:has(ul){ }
To detect list items that have other lists within them. Wouldn’t that be convenient?
AFAIK, the feature is not even in the plans for CSS, so my question is: why is this so?
This is generally called a “parent selector”; as you say, they don’t exist in CSS, though they could be useful.
There’s an interesting discussion here; the summary is that they would have a large negative effect on performance and would allow people to make mistakes with large consequences. People who understand these things seem to think that these issues can be overcome, but there hasn’t yet been sufficient demand for someone to actually do it.