it doesn't matter what the final outcome of the world is, believing in God gives you a purpose in life/a way to live life.
if you believe in religion and God, you mentally will start to follow a way of life. Just look at Islam for one, drinking is prohibited, sex before marriage is prohibited (and other rules), which gives it's followers a reason to stay away from degeneracy and follow God. And following such rules just brings you mental clarity and peace.
Believing in an ultimate being, regardless of it being true or not, is great. You fear a creator, you live a life of rules, you become a better person all in hopes of eternal happiness in the afterlife.