Religion is just a patsy excuse. There always have been and always will be evil people in the world who want to enslave, oppress or kill others in order to aggrandize themselves. But they cannot do it alone. They need the support of the masses. So they will come up with any story to gain the support of the weak minded that make up 90% of humanity. Religion is only one of many popular stories. There also are nationalism, manifest destiny, racial superiority, or any number of others.
Theology is the most popular story because it is based on faith, thus is immune to any attempt to use reason or logic to unravel the story and reveal the true motives behind it. But theology is just a red herring. What it boils down to is the same familiar theme that repeats itself throughout all of human history in both fact and in legend: good versus evil.