The subclasses a gerber layer contains determines what is contributing to that layer.
A component footprint might come with it own soldermask, a complex component PIN in a footprint might come with its own soldermask, a via, or your you might have added a soldermask somewhere unassociated with any component and placed it under "board geometry" and you don't want to mix them until the end for organizational purposes.
Ultimately you can add whatever you want anywhere but it mucks things up if you mix things into the wrong subclass since everything in that subclass has to be included. So if you put soldermask stuff under a silkscreen subclass, including it in a gerber layer includes everything else in that subclass too.
It's not a case of you pick one or the other. You have to know what is in the actual subclass of the things on your PCB.
Normally, the gerber solder mask layer contains pins->soldermask and maybe vias->soldermask (if you don't want tented vias) because only those layers usually have anything of relevence in the soldermask subclass.
For example, silkscreen gerber layers might include the components->refdes subclass so there are labels, as well as component->"package geometry" for component outlines. If you have silkscreen text for PCB revision, you might place it under board geometry->silkscreen and include it in the silkscreen gerber layer.
If you wanted the PCB revision info on copper so it would not be wiped out by cost cutting in the future removing the silkscreen, you could draw the text directly on the top->etch subclass so it is with the traces or you could draw it on the board geometry ->silkscreen and add that subclass to the etch gerber layer.
So it is not a matter of what is better. You add what you need and you need to know what is in the subclasses for the things being used on your board.