"Certainty about the next life is incompatible with tolerance in this one." Sam Harris
Imagine that you are the leader of a political body such as a nation. Now imagine that you want to go to war with another nation. How are you going to get your people to kill people that they don't even know? You have to convince them that the people of the other nation are somehow evil, immoral and a threat. Why should the people of your nation believe these things about an entire population of individuals that they have never met?
Well, if your population is indoctrinated into a way of thinking that allows them to think of their own group as separate from others and morally superior to them as well, then the desired enemy will be seen as an out-group and will therefore be seen to be owed a lower moral duty. If you continue this process by demonizing the target population, and by escalating the conflict to a matter greater than life itself, then suddenly killing members of the out-group may be seen as morally acceptable--a moral duty even.
This escalation of the religious or moral conflict with the target population is accomplished with the threat of eternal damnation for getting it wrong. Thus, the other population becomes a threat that could infect your loved ones and cause them to lose something greater than life--the afterlife.
The net result of this process of demonizing is the "weaponizing" of a population, turning otherwise peaceful people into hunters of the "other" like guided missiles but more sophisticated than any that our current technology can devise.
This use of religion is particularly necessary when the target population shares many traits with those who will be tasked with killing them. Killing another human being is not an easy thing to do, especially if it must be done at close range. Killing someone you see as the same as yourself is even more difficult--because such people are more likely to be seen as members of your moral in-group. Religion is essential in removing such people from your in-group and making them members of a group deserving of death.
Thus, when you hear about how religion does good in the world or is otherwise benevolent, you can reply:
Religion is an essential weapon of war--it is impossible to wage a war of aggression without it.
Or, depending on the context, you could say:
The purpose of religion is to turn the population into weapons of war.
Emperor Constantine understood this aspect of religion (christianity in particular) very well and put it to good use. Today's modern christian warmongers implicitly understand it as well, in my opinion.