Similarly, a great deal of social disgrace/stigma is attached to being detained in a jail. For instance, not many people would risk losing their honour/respect before their friends, family and society through imprisonment.
Furthermore, long imprisonment/incarceration can keep compulsive criminals and serial offenders away from the society and indulging in crime. To explain, psychopaths with criminal tendencies need to be separated from the mainstream of society as they cannot be reformed easily. All the above points clearly indicate the need for prisons to reduce crime in the society.
On the other hand, educating criminals about the implications of crime and supplementing to their educational and vocational deficiencies/inadequacies can definitely discourage them from committing further crimes to an extent. However, it can reduce the fear of committing a crime. Such methods cannot work independently but only as an addition to prison sentence.