Roots Discourse

When to use service providers in Sage 10?

Hi everyone,

I’m wondering when to use service providers in Sage 10 and when not.

For example in the Roots repository add_theme_support('align-wide'); is defined in setup.php

Within a extended variant of Sage 10: Stage it’s defined in a service provider called BlockEditor.

Are there any advantages or disadvantages to put e.g. add_theme_support('align-wide'); in a service provider instead of in setup.php? Or is this a matter of taste?