Searching for the actual cause takes work. For example, many Christians on this site seem to think that just because they don't know or understand how the universe works, a god must be responsible. Not so- but science is hard and "Goddidit" is easy.
Primitive man used to see lightning and not understand it, so he said it must be the work of angry gods. Today we know better about lightning, but sadly people still appeal to this type of thinking- a logical fallacy known as the Argument from Ignorance.
Why people can't just admit "we don't know yet" is beyond me. As a scientist I do this all the time- "we don't know yet...so let's find out".
Because believing in something that honestly isn't there and yet you're convinced that the imaginary thing is going to help you actually releases the stress you have and then provides more security. It's a psychological thing. They can't figure out life and so they need to believe in something that isn't there so they can feel more secure.
For the same reasons certain people recite scripture in even the most mundane circumstances, they don't have to think for themselves or face harsh realities head-on. Appeasement. God is so easy, especially in the face of things not understood.
Really it reveals a primary principle that really governs all humans. Note what the Bible says at Jeremiah 10:23 "I well know, O Jehovah, that to earthling man his way does not belong. It does not belong to man who is walking even to direct his step."
Thus the Bible shows that as humans we have limitations. This has becomes even more apparent when we you look at the inability of governments the world over to solve the problems facing their respective countries. Looking to the creator is the best course to take. As another Bible writer stated at Proverbs 3:5-7 "Trust in Jehovah with all your heart and do not lean upon your own understanding. 6?In all your ways take notice of him, and he himself will make your paths straight. 7?Do not become wise in your own eyes. Fear Jehovah and turn away from bad."
When circumstances are overwhelming we look for help wherever we can find it. For religious people that means talking to God.
It's not a complete waste of time for if they truly believe there's a God, if they truly believe that he can help them, it can easily give them the confidence they need to solve their own problems.
And it can also boost the power of their subconscious to solve their problem in its own way. NEVER underestimate the mind's capability of overcoming all manner of problems, including health problems. The power of positive thinking is well documented and if talking to "God" sets that positive attitude in motion then it's very worthwhile.
2Timothy 3:16. "The whole Bible was Given to us by inspiration from God and is usefull to teach us what is true and to make us realize what is wrong in our lives; it straightens us out and helps us do what is right." (Living Bible). We just need to read it it and ask for understanding, test it out.