Thousands of years ago, there were these two neighboring tribes.
The tribes had both been acting badly for a very long time. They didn't respect the animals they killed. They didn't follow the laws and agreements of proper warfare. They did terrible things to smaller and more vulnerable tribes they came across.
One of the deities of these tribes, the one who was in charge of morality and who took the form of a deer, noticed this and decided to intervene. So the deer deity, instead of punishing them or maybe as a way of punishing them, tried to correct their behavior by giving them a new form of sensory perception. The people in both of these tribes developed an additional form of sensory perception. The way that we can see colors and fish can feel electricity, their new perceptual abilities allowed them to sense a new kind of goodness and badness.
The deer deity, however, wasn't quite sure which form of value perception would be the most helpful for improving these tribes' behavior. So the deer gave each tribe a different kind of value perception. The first tribe was given organs that sensed when actions broke or were required by a given set of moral rules, as well as what might be considered especially good under these rules but not required. The second tribe was given organs that sensed when actions made the world a better place.
As it turns out, this new form of perception only moderately affected their behavior. Of course, they did think that it was good to do good things, and they were sometimes surprised when they saw that something there was doing wasn't good. For example, one tribe was going to hunt down and enslave a smaller tribe but was surprised to see that it would be wrong to do so. They didn't quite know why it would be wrong, but the sudden perception was enough to stop them. Over time, however, they started to doubt and even resent these perceptions. They sort regarded them as a nuisance or nagging outsider's voice. And they collectively realized over time that they could still do wrong without consequence. This felt freeing. Even when the deer supplied people with the ability to recognize reasons for their moral perceptions, it did not help much.
The deer then realized what it needed to do. The tribes needed a desire to be good, a stronger one than whatever abstract desire they had. The first tribe came to perceive wrongness in their actions as a source of pain and rightness as a source of pleasure. Thus, moral goodness was experienced as a kind of pleasure and badness as a kind of pain. And in the same way, we can reasonably predict what color a tomato will be in different conditions of ripeness, they could accurately intuit whether an action would be good or bad. The tribe that had been given the ability to perceive goodness and badness in terms of a given set of rules became much better behaved. They became do-gooders. They no longer engaged in greedy conquests, stopped eating animals altogether, and were extremely helpful to the needy.
So, the deer diety was making plans for the second tribe. The plan had been that the second tribe would, similarly, be given pleasure every time the world was made better by them, and pain when it was made worse by them. This was sure to work. And it was also sure to produce the same results. So the deer diety, taken by curiosity, gave the people in the second tribe a different sort of feeling. Whatever they made others feel, they themselves would feel. After some initial confusion and suffering, the second tribe quickly became like the first. They were conscientious, never even stepping on bugs, never acting out of jealousy or spite, listening to each other intently, self-reflecting, and helping everyone and everything they could to live a good and happy life.
Many centuries passed. The first tribe turned into a civilization and over time had more and more complex moral questions that even the deer diety didn't know the answers to. For example, if one is required to save ten lives, but must kill to do so, and one is forbidden from killing, then what should one do? Ought one to distribute extra resources throughout the community according to what others earned from their effort, or according to a principle of equal distribution? Did those who had more resources really earn them, or was there an unjust system in place that let them take those extra resources? Again, the deer deity did not know. The deer was from a more ancient time where things were simpler. As people's opinions differed, so did their moral perceptions and the attached feelings. While these people still acted well, their civilization changed directions many times according to the prevailing attitude about what the right set of moral rules was.
The second tribe, which had ceased considering itself a tribe quite a while back, also developed into a civilization. They, however, did not encounter these sorts of issues, as there was not really a direct question of what was right or wrong, forbidden or required. If one, for example, had to kill someone else to save ten others, then the killer must willingly join the killed in the pain of death to feel the relief of the lives saved. Giving money to those who had less was not a question of their deservingness, but how wonderful it would feel to join them in the relief of getting much-needed food or medicine. The problem the second civilization faced, however, was that it began to encounter more and more outside civilizations and species of animal. Knowing that there were things they could be doing to help these others that they were not doing caused people in this civilization pain. But the leaders came up with a plan— they would imagine their own civilization in a circle, and expand that circle as much as it could every year. The people of the civilization hoped, for its own sake as well as for the sake of others, that one day the circle might be as wide as the world itself.