People considered good are usually because they did something beneficial to others. People only have a certain amount of time and assets so the others they usually do good for, are those close to them, their family or groups they are in. Groups are made up of some people but not all people, so there are insiders and outsiders. The outsiders end up in other groups with different ideas of what is good for their own group. Society ends up divided with different groups competing for limited resources.
That could be a vice if every group automatically dislikes every other group without taking the time to try and understand them.
I think people naturally try to do good within their group because they want to continue being a member of their group because we're not internally wired to be alone. Humans need group support from the moment they are born or else they will die. We're not like giraffes that drop out and get up and walk on our own. We need our mothers at least, for many years, and she needs group support while she is busy tending to us as babies.
So we're going to group, and we're going to do good things for the group so we don't get shunned from the group. The trick is to realize that other groups are just like our group, and try to understand the other groups. There is still going to be group competition because the world has limited resources. But its better to compete in a fair market of ideas, rather than forcing things on others. And better to try and trade ideas and collaborate with others, then eliminate other groups.
Random thoughts on your prompt. Hopefully it makes some degree of sense! :)