Importing contacts from iCloud - tags are confusing

I have set up eM Client to sync with my iCloud contacts, which are organized into groups via the Mac address book/contacts app.

When I import contacts into eM Client, many of them have tags which seem to be related to the Groups they are assigned to in the mac address book. However, not all of them are tagged this way - it’s very inconsistent.

Can someone explain what is going on here? Are the Mac contact Groups supposed to transfer over as tags?

If so, why is it working for some and not others?

If not, then where did these tags come from?