There is a category of social problems for which current solutions just don't work and still we don't really seem to care. We really want these problems to be solved and we for some reasons the solution strategies we have are the only ones we can think of. Not trying these strategies is like not acknowledging the problem. Still, it's silly. Some examples are: development aid (doesn't work, but we'd like to do something), secondary school teaching (most people forget everything they learn there) and punishing criminals by prison terms. About the first two maybe some other time more. Now for prison.
Crime punishment has of course a number of functions. Revenge, keeping bad people out of society and so on, but the most important one is to make sure the criminal won't do it again. Originally, re-education was a big item here, but over the years at least in the US, the plan seems to be to deter criminals from doing it again by punishing harder. Either way doesn't work. If criminals are educated in prison, then it is only in new ways of crime and if they come out with plans to better their lives, it is mostly the plan not to get caught again. As for deterrents: if hanging somebody for stealing bread in the nineteenth century didn't work, what is? Take a look at the statistics. In America, 5.1% of the population will serve time at some point in their lives. For black males, this is 28%. 67.5% of released convicts gets arrested for something serious within three years of release (on average more then three times).
So why do we keep putting people in prison? I don't really know. Partly it has to do with the revenge part. For example: say we have a murderer and you are the judge. You can give him life, or this new pill, which alters his brain state and makes sure he'll never murder again. The catch? The pill does not work if combined with a prison term. You choose. Maybe the more open-minded readers of this blog will tend to choose the pill, but the general population? Barbertje moet hangen.
There is the more cynical view that prisons mainly function as a marking and sorting system. Our complex society tests its members, just like products in a factory. Those that are unfit are thrown in prison, not to punish them, but to mark them as ex-cons in order to make sure that they will not be hired by accident. If you think there's something to this, read Michel Foucault.
There are two alternatives I can think of, that we should consider. I'll present one here now and one other somewhere in the future. The first alternative to prison as a punishment is torture. Now I realize that torture has a bad name, but I think this is more to associations with the Spanish Inquisition than to fact. Torture as punishment should be clean, medically supervised and not scar, should not lead to any lasting physical problems. The only thing is that it should hurt. Hurt badly. So badly that people won't do it again, or even better, won't consider doing it in the first place.
Before you decide that torture is inhumane, think about the inhumanness of prison terms. If somebody walks out of prison after ten or twenty years, you have effectively not only destroyed the last years of his life, but also the coming years; it is very hard to get back into society. If you torture somebody and this lasts only one day, nothing but punishment has been applied. The person can go to his job the next day as if nothing happens. He gets a new chance.