Jesus answered, “The most important is, ‘Hear, O Israel: The Lord our God, the Lord is one. And you shall love the Lord your God with all your heart and with all your soul and with all your mind and with all your strength.’ The second is this: ‘You shall love your neighbor as yourself.’ There is no other commandment greater than these.” (Mark 12:29-31 ESV)
It is part of human nature to seek answers to life’s most important questions — Who are we? What is our purpose? Where are we going? — and we seek answers to these questions no matter if we’re religious or not. If one believes in an afterlife, one typically believes that to get there one must pass some moral test. The problem is which moral test must we pass? What must we do to qualify for the afterlife? Usually, the moral test in mind involves live a good life, be nice to others, etc. The only problem I see with such moral codes is how do you know you’ve done enough good deeds? There is no security in a philosophy like this, and advocates of this line of thinking know deep down that this is true. In most cases, people who believe this think that surely if there is a God, he will let me into heaven because he knows I’ve tried my best to live according to this moral code.