Retribution provides almost no societal benefit. Most of society doesn’t know or care about any individual crime. Rehabilitation of a single member however will benefit all of society, as you can’t predict all possible social interactions of a single person.