Think about how rules are written, applied and work.
In talking about a tree, you have very few basic constructs: Element name, attribute, ancestor/descendant relationships.
You write a CSS selector like .foo bar * bat.
These are based on, effectively, element names and attributes (tho there are some 'special' kinds of attributes like ID which is really just an attribute with unusually high specificity and class which is really just an attribute that contains a serialized DOMTokenList). Aside from these the only other thing in your vernacular is "descendant of" or "child of" or some few things about your immediate siblings.
Now, think about when the document is parsing, what does the browser have to do? At some point, it needs to figure out "which rules apply to this element right now" and then make sure that they are applied, in specificity order so that it can figure out what to paint.
Let's imagine that you have a few hundred rules, that's not entirely unusual. Let's imagine that your DOM