The guidance we give for TemplateStyles is to assume that the CSS won't apply outside of the template which contains the <templatestyle> tag (although this cannot be technically enforced yet). See e.g. caveats, item 3.
This is at odds with an important use case: styling article content, especially templates, which tend to involve repetitive inline styles and can look quite monstrous (see this table as a random example). Since the content comes from the article itself and not a template, there isn't really any way to apply CSS to the table while keeping it inside the DOM node(s) of the template. One could use a wrapper template:
{{wrapper|content= ...lots of wikitext here... }}
but that will break VisualEditor which cannot visually edit template parameters; and turns | into {{!}} in the wrapped wikitext, which is a nightmare for large tables.
In the long term, heredoc template syntax (T114432) might be the solution; for now, we need to decide what guidance to give on current usage patterns of TemplateStyles. Tables in articles are an important use case and we shouldn't discourage people from fixing it, but we also do not want for everyone to fix it differently, and probably want to track such out-of-template-scope usages in some way.