Why does macOS Mojave change a group's name automatically? Created a user group called &quot;Duo&quot;. When I add it to a directory, macOS Mojave (10.14.6) automatically changes the name to &quot;Dev&quot;.

Even id says my user is group &quot;Dev&quot; (and not &quot;Duo&quot; as it was named):
$ id
uid=502(s) gid=20(staff) groups=20(staff),505(Dev) ...

What's actually happening here?
Figured it out. I had originally created a group called Dev and then immediately renamed it to Duo through Users &amp; Groups in System Preferences. But appparently this only makes a cosmetic change in the gui. I don't know if this is an expected behaviour by design or a bug on macOS Mojave 10.14.6 ...
To reproduce it:

Open System Preferences &gt; Users &amp; Groups from the Apple menu.
Click the Lock icon and unlock as an administrator.
Click the + icon (below Login Options).
Select Group from the drop down menu of New Account.
Enter a name for the group in Full Name and click Create Group.
The new group will be immediately listed in the sidebar, under Groups.
Click on the newly created group name in the sidebar.
In the Name field, change the name of the group to something else.

Expected: macOS Mojave renames the group name.
What actually happens: macOS Mojave doesn't actually change the group name in the system and continues to use the original group name. But it shows the renamed group name in the macOS GUI (in Users &amp; Groups).
Tip: To actually change the group name through Users &amp; Groups, you have to right-click the group name in the sidebar, and click on Advanced Options and input the new name in Group name and click OK. (This introduces another weird behavior / bug for me - if you right-click and change the name through the Advanced Options, it won't be shown again to you in the same session - i.e. right-clicking the group name after renaming it won't show a right-click menu again.)