What we consider moral behavior can be motivated by religious beliefs, an inherited set of values, empathy and enlightened self-interest.
I believe two other factors lead to “moral” behavior: empathy and enlightened self-interest. First of all, I believe that the capacity to feel what others are feeling, to put yourself in their shoes and emotionally identify with them, is the basis of much behavior sanctioned by moral codes. For me, and I suspect for a great many people, it’s more than a capacity; it’s an inclination, something that happens automatically, whether or not I intend to empathize.
Since humans are a social species and function best in groups rather than in isolation, it makes sense that we can empathize: it improves communication and promotes social cohesion. To be “moral” in this light is to behave in ways that benefit the family/group/tribe/species as a whole, rather than simply gratifying individual desires without regard to the feelings or needs of anyone else.