In order to cooperate in larger groups, we needed a common cultural idea that created shared trust.
For the vast vast history of our species, we didn't live in groups larger than 50 to 150. One of the reasons for this is from a genetic standpoint is that we are only built to cooperate with as many people as we can know well.
When you go beyond 50 to 150 people, which is beyond the # of people you can know well, you to have freeriders or cheaters in the group. And when you have too much of this, the group can't sustain itself.
It was only in the last 12,000 years that we ed to have groups become larger than 100-150, going up to 1,000 to 10,000 people. For this to happen, we needed something larger than just our genetic inheritance, we needed a cultural idea as a basis to trust someone.
Azim believes that religion was one of these cultural ideas, and suggests that part of the reason for religion to occur, was so people would have a shared belief in order to cooperate, which is also why Azim argues that there's a positive correlation with how punitive or inclined to punish the gods in a particular religion are, with the size of the group.
Because people tended to act right if they thought there was a common god that was going to punish them for doing wrong, and the larger the group, the more strict the punishments needed to be.