This quote means that we would be a sad group of people if our only motivation to do good things was fear of punishment and hope of reward. That is, if we only acted kindly and morally because we are being punished or rewarded, then that is not a good sign for humanity. We should be motivated by more than just reward or punishment.