For centuries, philosophers have questioned whether the universe can be random and meaningless. Existentialists have eloquently described the terrifying idea of an indifferent cosmos in which the individual is merely an accident without significance. For someone disturbed by such angst, religion can offer meaning and purpose. It says the world is not chaotic after all, that there is an underlying order that explains everything, a cosmic coherence that makes everything seem reasonable.
This is interesting because my experience was the opposite. It was when I stopped believing in god that the world began to make sense.