Will Durant said this quote

Fear of death, wonder at the causes of chance events or unintelligible happenings, hope for divine aid and gratitude for good fortune, cooperated to generate religious belief.