I think the answer is quite simple, really.
Reality is oftentimes hard to deal with.
The coping mechanisms that we develop as children usually involve a great deal of fantasy, or the complete blanking out of a bad memories with a fantasy cover-ups, which doesn't bug us until later in life. Many people outgrow these fantasies, and learn to accept the bitter parts about life. They learn to accept the fact that everyone will die, that bad people sometimes get away with horrible crimes and never go to jail, and that many of your good deeds will never be rewarded. It is my assertion that people who are religious do not want to grow up and accept life's negatives. They would rather deny the unpleasant realities of life, and cover it up with the patented fantasies that religions have to offer.