As Dawkins himself points out, evolution is quite good at optimizing away traits that are detrimental to survival. Therefore, there must be some advantage to religion.
Humans are no longer subject to traditional evolutionary pressures (starvation & predation). We are the apex predator. The only animals we have to compete against are other humans.
There are only two ways one group of humans can outcompete another group:
1. increase their birth rate
2. destroy the other group
All successful religions promote both of the above goals. (Or, conversely, a religion is successful to the extent it promotes them).
Here are some of the traits that successful religions encourage:
- improved internal cohesion & loyalty. Religions provide certain rules for dealing with other people. These rules must, at the very least, incorporate reciprocal altruism ("do unto as you would have them do unto you").
- enhanced xenophobia. The hatred of the outsiders (particularly those who believe a different set of fairy tales) is proportional to the internal loyalty. Realistically "love thy neighbor" applies only to the members of the in-group, while the outsiders can face anything from discrimination to turture & death. It's no coincidence that so many wars have a strong religious component.
- increased birth rate. There is a strong positive correlation between religious belief and fertility. This is partially a side-effect of the religious dogma (e.g. ban on contraception, sex education, and, in general, infantile attitude towards sex). It can also be part of deliberate strategy (e.g. Quiverfull movement today, mormons in 19th century, etc.)
- coping mechanism. Turns out religious people are, on average, happier than non-religious. Probably because when something good happens, it's evidence that god loves you, and when something bad happens, it's part of god's plan and he loves you.
This is by no means an exhaustive list. I'm sure you can think of more. But the point is, successful religions encourage believers to have more babies and kill off the non-believers.