Hmm this appears to be a bug. I think it acts like this so that when the a module like the forum makes a group called "forum-members", the user doesn't accidently change it. Maybe if a seperate field for forum code, that doesn't automatically change when the title is changed is a good idea.
Ok, but what about groups that don't have any permissions?
If you create a frontend usergroup you can't give it any permissions in the cms, so there's no permissions to be checked for.
And it's not possible to set Permissions like 'ViewPage' or something in the security section, and having to add it manually to the db seems odd.
The AddToGroupByName method seems very useful, if the 'code' field would follow the title field.