Justice and Rationality
In the Republic, Socrates argues that justice pays.
Justice is necessary for rationality and hence for the ability to make choices that are likely to result in the best life and most happiness. In a just human being, the three parts of the soul are in "harmony." Reason rules, spirit is reason's ally, and appetite is held in line. The three parts of the soul are organized so that action is in accordance with the knowledge of the good. This knowledge belongs to reason. In this part of the soul, there is the knowledge that existence in the body is temporary, that the body and its needs are distractions, and that the good most of all resides in a certain exercise of theoretical reason involving knowledge of the forms.
Hence, in the Republic, the just life is better than the unjust life. Injustice improper psychological functioning and disharmony among the parts of the soul. The unjust human being does not always act for the sake of the good.
north of the Mare Imbrium ("Sea of Rains")
Ruling is Part of a Plan
In a just city, the rulers are lovers of wisdom. How can this be? Wouldn't the rulers be better off abandoning their posts and spending all their time in the love of wisdom, since this is the activity in which happiness consists most of all?
The solution to this puzzle is not completely clear, but part of the idea is that ruling is part of a plan to maximize happiness. The ruler expects that taking his turn in ruling over the city will maximize his time spent in the love of wisdom and hence maximize the satisfaction he takes in his life on earth in the body. It is not rational for him to shirk his duty to rule since if he were not take his turn, he would increase the probability of spending less time in the love of wisdom and hence increase his probability of being less happy.
"Each ruler will spend much of his time in the love of wisdom, but, when his turn comes, he labors in politics and for city's sake, not as if he were doing something fine, but as a necessity." (Republic VII.540b.)
"The soul is conceived of as preexisting and as just temporarily joined to the body. It thus has two lives and two sets of concerns. Its own concern is to live a life of contemplation of truth. But, joined to the body, it also has to concern itself with the needs of the body. In doing this it easily forgets itself and its own needs, it easily gets confused so as to make the needs of the body its own. To know how to live well is to know how to live in such a way that the soul is free again to clearly see and mind its own business, namely to contemplate the truth. Thus we have an extremely complex inversion of the relative weight of one's theoretical understanding of reality and one's practical knowledge of how to live. It is one's understanding of reality, and the position of the soul in it, that saves the soul by restoring it to the extent that this is possible in this life to its natural state, in which it contemplates the truth. Hence a good life will crucially involve, as part of the way one lives, contemplation of the truth. Practicing the right way to live will also be a means to enable the soul to free itself from the body, to see the truth, and to engage in the contemplation of truth." (Michael Frede, "The Philosopher," 9.)
"[W]hereas Socrates had thought that there was no need to gain theoretical knowledge about the world or reality and that perhaps it was even impossible to do so, since it was not the function of reason to gain such knowledge, both Plato and Aristotle disagreed. They thought that it was crucial not only for a good life, but also for an understanding of how to live well, to have an adequate general understanding for the world. Moreover, though they granted that it was a function of reason to determine the way we live, they, each in their own way, did not think that this was the sole function of reason. Plato rather seems to have thought that guiding us through our embodied life is a function which reason takes on, but that it, left to itself, is concerned to theoretically understand things quite generally." (Michael Frede, "Introduction" in Rationality in Greek Thought, 13.)
Two Lives Compared
Even so, might it be possible that some unjust life is better than the life of a lover of wisdom who does not live in a just city?
Glaucon sets a very high bar. He asks Socrates to show that a just human being who suffers what are popularly understood as great misfortunes is still better off, even if the comparison is to an unjust human being who suffers none of these so-called misfortunes but instead is showered in what are popularly understood as the good things in life.
"We must take away his reputation, for a reputation for justice would bring him honor and rewards, so that it wouldn't be clear whether he is just for sake of justice itself or for the sake of those honors and rewards. We must strip him of everything except justice and make his situation the opposite of the unjust person's. Though he does no injustice, he must have the greatest reputation for it, so that his justice may be tested. ... [T]hose who praise injustice at the expense of justice will say that a just person in such circumstances is worse because he will be whipped, stretched on a rack, chained, blinded with fire, and, at the end, when he has suffered every kind of ill, he'll be impaled...." (Republic II.361b-362a.)
It is not at all clear that Socrates actually meets this challenge. The reason is that he does not explain, in any detail, what happiness is. The love of wisdom makes a substantial contribution. This much seems clear, but Socrates does not explain how this contribution is weighed in comparison with other things traditionally thought to contribute to, or detract from, happiness.