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 & 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:

  1. Open System Preferences > Users & Groups from the Apple menu.
  2. Click the Lock icon and unlock as an administrator.
  3. Click the + icon (below Login Options).
  4. Select Group from the drop down menu of New Account.
  5. Enter a name for the group in Full Name and click Create Group.
  6. The new group will be immediately listed in the sidebar, under Groups.
  7. Click on the newly created group name in the sidebar.
  8. 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 & Groups).

Tip: To actually change the group name through Users & 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.)