Prisoner's Dilemma is often mentioned to assert that morality is not rationality and that it makes possible the optimal choices which rational players can not choose. However, I argue that this view is not a correct solution of the dilemma. Rather, folk theorem provides the way to achieve the optimal rationally. It shows that a cooperative action is taken by each player to maximize his or her payoff in the long term. Therefore, morality should be seen as a kind of rationality. From this perspective, virtues are some advantageous characteristics of particular rational agents and moral rules are descriptions of equilibrium strategies in the social repeated games.