A chimp who displays feelings of affection toward the other members of its social group is more likely to be defended by these group members from raiders outside of the group—even at the risk of harm to these defenders—than are those chimps who rarely or never display feelings of affection toward their associates.
Conclusion
From a sociological perspective, affection plays a similar role in chimp and in human communities.
Evidence
Humans are more likely risk danger to save someone they have affection for.
In chimp communities, chimps who show affection for others are more likely to be saved from danger by other group members than are those who don't show affection.
Evaluate
The author is just trying to establish that affection plays a similar role. Let's clarify for ourselves the role in each of chimp/human, to study the similarities and differences.
In humans, we're more willing to face risks for people we have affection for. If I really like Eddie at the office, I'm more willing to face risks for him than for Stuart, whom I don't really like.
In chimps, we're more willing to face risks for the gregarious (outgoing, affectionate, life-of-the-party) chimps than for the shy ones. The ones who go around giving out affection, grabbing your arm, giving you big hugs, high fives ... those are the ones we protect. The wallflowers who have closed body language don't get saved.
The sameness is affection and risking danger to save.
The difference is that in the human example, the recipient of affection is being saved by others.
In the chimp example, the giver of affection is being saved by others.
Goal
Since the author wants to assume these two situations are the same, she must be assuming that the people who give out affection, get back affection. That makes the chimp and human example more fair to compare.