A considerable share of the literature on the evolution of human cooperation considers the question why we have not evolved to play the Nash equilibrium in prisoners’ dilemmas or public goods games. In order to understand human morality and pro-social behaviour, we suggest that it would actually be more informative to investigate why we have not evolved to play the subgame perfect Nash equilibrium in sequential games, such as the ultimatum game and the trust game. The ‘rationally irrational’ behaviour that can evolve in such games gives a much better match with actual human behaviour, including elements of morality such as honesty, responsibility and sincerity, as well as the more hostile aspects of human nature, such as anger and vengefulness. The mechanism at work here is commitment, which does not need population structure, nor does it need interactions to be repeated. We argue that this shift in focus can not only help explain why humans have evolved to know wrong from right, but also why other animals, with similar population structures and similar rates of repetition, have not evolved similar moral sentiments. The suggestion that the evolutionary function of morality is to help us commit to otherwise irrational behaviour stems from the work of Robert Frank (American Economic Review, 77(4), 593–604, 1987; Passions within reason: The strategic role of the emotions, WW Norton, 1988), which has played a surprisingly modest role in the scientific debate to date.