User display names depend on group

Currently we are using the group member API (e.g. /rest/api/group/member?name=confluence-users).

We query multiple groups for their members.
The strange thing is that, depending on group name, the display name of a user changes. The accountId is the same for both display names:

{"value":"User 567sg","accountId":"XXXXXXXXXXXXXXXXXXXXXX"}
{"value":"Jane Example","accountId":"XXXXXXXXXXXXXXXXXXXXXX"}

That means when querying different groups, we get as display name either User 567sg (which looks like a system assigned name) or Jane Example.

Any explanation for this behavior?