I think it's been established that religion arose to explain life in order to control it to the advantage of the people
Some would say that religion arose to control it to the advantage of the priesthood (or clan chiefs or whatever) rather than for the benefit of the people.