Hi, I'm Robert and I'll be helping you with your computer question.
i am not sure why that is happening. perhaps a bug with gmail. i can't find anything that says whether it should delete automatically from groups when the contact is deleted
what i can tell you is that it is pretty easy to remove it from the groups right before you delete it, which should solve your problem in the future
The list of contacts displays on the right side of the window. Find the contact that you want to remove from a group or switch from one group to another. Hover the cursor in front of the contact's name and click in the box that appears.
Now click the "Change Groups" icon in the upper right side of the window. If the contact is in an existing group, it will be checked as shown in the image. To remove the contact from a group, click on the group name and the check will disappear.
When finished, click anywhere in an empty part of the window (gray). Gmail will briefly display a message confirming the change you have just made, and return to the contact list.
then delete the contact.