The resulting need to break this attachment to creatures is another
punishment for sin, referred to as "temporal punishment", because, not
being a total rejection of God, it is not eternal and can be overcome in
time. Even when the sin is forgiven, the associated attachment to
creatures may remain.
The temporal punishment that follows sin is thus undergone either during
life on earth or in purgatory. In this life, as well as by patient
acceptance of sufferings and trials, the necessary cleansing from
attachment to creatures may, at least in part, be achieved by turning to
God in prayer and penance and by works of mercy and charity. - Wikipedia
Religion is weird. Seriously. Different religions each have their various rules and laws, which are often contradictory, but the most common factor is the God factor. Religions revolve around the idea that there is a Creator, sometimes all-powerful, sometimes omnipotent and omnipresent, but mostly known as the man/woman/entity in charge of all of our lives.
Let's use Christianity as an example, specifically Catholicism. There are a whole lot of things you can and cannot do according to God, and then some more things that are not overly clear. Then there's the whole "well the bible was written quite a long time after Jesus was alive" thing, so it's probably not true anyway. But you've gotta have faith. Because, who are we without faith? Rational people who have a good sense of self responsibility? Please, who wants to live like that? Not me, for sure. So we have to believe that the bible is God's word/law/whatever. It's not like we can admit to possibly being wrong about this, how stupid would that make us look? Seriously.
So now we try to live according to these contradictory and unclear laws, but we all know that there is a whole hell of a lot of room for wiggling, because God forgives (except when he is in wrath-mode, which is, like, most of the time. I dunno, it's not really clear. It depends what part of the book you're reading. So yeah) - so you can pretty much do whatever you want without too much guilt, because you can just call up or go to a priest and he'll (or she, but not likely) give you some prayers to say or money to donate to the church (lollers) that will make God forgive you. Don't question. The priest knows. The priest spent time learning how to communicate with God and read his/her/it's mind.
So we can all live how we wanna, because we essentially are not going to be held accountable for our actions (at least not in our own eyes), because only God holds us accountable, and he/she/it is a merciful God. How do I know this? I have faith. I believe. Also I have not been struck down by lightning, which is one of those pesky little points of not so much clarity in the big book of God words. Hopefully you have money enough to take long leave of absence's to go on pilgrimages to have your sins forgiven - if you feel guilty enough. I suppose it can be quite hard feeling guilty for doing things you know in your heart you're not really responsible for - this is certainly a challenge given to us straight from the big G.
Oh man, it totally makes sense why people believe in God and stuff. Totally.