The Adaptive Logic of Moral Luck