In his book “How the Mind Works”, Steven Pinker uses the computational theory of mind to explain how the mind works, which states that the mind operates like a computer. This coupled with Darwinian thought explains how we developed an intrinsic morality. It appears that Jung also agrees morality is intrinsic to us humans, not requiring some religous doctrine for morality.
It should never be forgotten that morality was not brought down on tablets of stone from Sinai and imposed upon the people, but is a function of the human soul, as old as humanity itself. Morality is not imposed from the outside; we have it in ourselves from the start – not the law, but our moral nature without which the collective life of human society would be impossible. This is why morality is found at all levels of society. It is the instinctive regulator of action which also governs the collective life of the herd.
Carl Jung