I believe that the reason the style attribute is disallowed by Discourse is because one could use url values to track people and extract information about them. My first attempt at the styling pointed out by @TIMAI2 was with using the style attribute and I ran into this issue. Since the use of data attributes isn't forbidden, I overloaded those instead and applied some CSS tricks to make them useful.
Its just text formatting and not javascript, so how can one track someone ? I never learned that CSS is for performing actions. CSS doesn't even allow js statements to run in it.
I think the main expectation would be that people would use it correctly since doing so can help improve communication whereas using it incorrectly can make it harder for someone to understand what you're trying to say. Just not using it is more useful than purposefully misusing it.