This question already has an answer here:

I am interested why processes are grouped additionally while having already a PPID and PID. What's the advantage of process groups?

marked as duplicate by Jeff Schaller, Community Feb 23 at 11:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.