Religion is needed, much like a doctor is needed when we are sick. When we experience the unbearables in life or near death, etc we seek religions as a way to our problems - preceived or otherwise.
Speaking as a person who turns to religion for such things, not everyone needs it for such comfort.