There is no useful evolutionary reason for such a belief-indeed, given the chaos and slaughter that one can historically attribute to "religion," the very notion of a creator and an afterlife seem counterproductive to some, and have a history of counterproductivity. If there is no useful purpose to it, from an evolutionary standpoint, and yet humans everywhere have always believed in such things, then the least complicated reason for it is that there is a God. :lol:
Daniel Dennet suggests that religion evolved just like everything else. He suggests some evolutionary mechanisms and pressures and provides a very plausible and secular explanation for religion.