Why does macOS Mojave change a group's name automatically?
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.)