How does visibility of automatic groups work?

There is a comment in the code that explains what is going on: “hide automatic groups from all non stuff to de-clutter page.” That happens here: discourse/app/controllers/groups_controller.rb at main · discourse/discourse · GitHub.

What the code is doing is overriding the group visibility settings for automatic groups when the groups page is viewed by a non-staff users. Only the moderators group will be displayed.

Unrelated to the issue, but when I tried to onebox the Github link that I posted above, the code was displayed in the onebox without any formatting in the preview: