Its a deterrance to most people, but then maybe you are an exception. :-)
I really doubt that getting raped in prison by bubba and his thugs is a big deterrant against breaking the law. Afterall the ones doing the raping are the true criminals and they outnumber the ones getting raped. So who's deterring who? From what I hear the prison population is only getting larger.