Humans are outstanding in their ability to cooperate with unrelated individuals, and punishment – paying a cost to harm others – is thought to be a key supporting mechanism. According to this view, cooperators punish defectors, who respond by behaving more cooperatively in future interactions. However, a synthesis of the evidence from laboratory and real-world settings casts serious doubts on the assumption that the sole function of punishment is to convert cheating individuals into cooperators. Instead, punishment often prompts retaliation and punishment decisions frequently stem from competitive, rather than deterrent motives. Punishment decisions often reflect the desire to equalise or elevate payoffs relative to targets, rather than the desire to enact revenge for harm received or to deter cheats from reoffending in future. We therefore suggest that punishment also serves a competitive function, where what looks like spiteful behaviour actually allows punishers to equalise or elevate their own payoffs and/or status relative to targets independently of any change in the target's behaviour. Institutions that reduce or remove the possibility that punishers are motivated by relative payoff or status concerns might offer a way to harness these competitive motives and render punishment more effective at restoring cooperation.