I don't think that's the main reason for most religious people. Human beings are hard-wired to seek a connection to something greater than our individual selves. We each find that connection in our own favorite combination of religion, work, art, music, sports, war, community service, old cars, etc. I know plenty of Christians who aren't sure if there's an afterlife or if anything in the Bible is factually true, but they like to believe in God and Jesus anyway because it makes them feel more purposeful.