Because people need/want to believe in something when all hope is lost,it makes them feel better,it helps them think that they still have a chance.How do you think these people feel when they are put in prison?It's like the end of the world for most of them.Do you even know someone who has been in prison?Have you talked to him on the matter?I don't think so.
Do you need/want to believe in something to make you feel better even if you are convinced it's not true? If yes, then why are you an atheist? If no, then why are you speaking for other people if you don't share their views about the world?
I'm sorry, but you are failing to convince me that an atheist put in prison becomes a religious person.
I'm willing to concede though... maybe a person who never considered any religious claim to get to their own position could be converted to religion by ending up in jail. But I don't think it would be fair to call this person atheist simply because they never picked a religion. In my oppinion you can only become an atheist after you considered the claims from religions and consciously decided to reject them. If you never considered a religious claim, it's meaningless to call such person an atheist, since religion is a non subject to that individual.
but we were not talking about those kind of 'atheists' were we?