Becoming a non-perfect human being, performing mistake after mistake, and presenting vulnerable traits, we are seemingly bound to commit sins and various crimes. We may not be red-handed for doing so, but the guilt and the imprint of the deeds remain, carved in our memories that regulate conscience. When the destined time comes upon us, we fall into the abyss of regret and impossible wish to turn back time.
This is where exactly religion plays its role. Beside begging for material possession, there is another form of prayer that people usually do: asking for forgiveness. By gaining the thought of being forgiven by the Supreme Being, people possess the sense of security and thus peace. Not to mention what is the purpose of prayer if it's not for self-salvation?