Parents do lots of bad things to get their children ahead. Consider the soldier who "loves his country" but "hates the enemy." Prosocial behavior benefits your society, not other societies. But there's also no reason to think it benefits individuals.
We know the halo effect is real and we have no reason to think empathy to attractive people is the same as empathy to ugly people.
More worryingly consider the case mother cat. Mother cats love their kittens. They also eat them sometimes when they are sick or there's not enough food. The same drive to have genetic offspring can produce care and intense hate. There's no reason to think apes don't have similar kinds of natural urges.