Our Gorgias episode, included Plato's claim that the purpose of punishment is reformative, i.e. to build character, either in the punished (reformation) or in observers (deterrence). That someone who does injustice should not then be rewarded for it is on Plato's account the natural order of things, true by definition, as it were, and is in itself a reason (much like Kant's thinking about this, as discussed here) for believing that there simply must be an afterlife where the virtuous are rewarded and the bad punished.
This is, to Socrates's interlocutors and likely to the readers, pretty goofy, archaic thinking. For a heap of discussion of modern positions on punishment, you may want to check out Zachary Shemtob's "Cruel and Unusual" podcast. I just listened to his interview from last May with Jeffrie G. Murphy, professor of law and philosophy at Arizona State University.
This particular episode goes through the various theories: retributive (people deserve it), reformative (it helps the punished's character), and, more generally, utilitarian (it provides deterrence or other benefits such as prevention of crimes through the incarceration of potential criminals. Murphy argues that we could have a much less draconian and arbitrary system of punishment without any cost in safety.
Other Cruel & Unusual episodes cover the history of punishment (the podcast was almost called, according to the host when I spoke with him about it at its launching last year, "Discipline & Punish"), specific points of ethics (in one episode, a former police officer argues in favor of giving offenders the choice to receive flogging instead of some other punishment!), the science behind our desire to punish, theological issues (the history of ideas re. what hell is like!), and other issues. It's short and well-edited, so check it out if the topic is interesting to you.