Aside from genetic differences in empathy and self-control, moral compass is almost entirely acquired. As with other skills, one's ability to gain awareness depends on various facets of innate capacity, but one's perspective and understanding build and progress with experience. The topic of moral reasoning was studied by Lawrence Kohlberg, who found an individual's reasoning style to develop through up to six plus stages. A couple of key trends from one stage to the next are (1) larger circles of consideration and (2) fitness for more complex moral dilemmas. The stages, from Wikipedia and copied from another answer of mine, are as follows (emphasis mine):
Level 1 (Pre-Conventional)
- 1. Obedience and punishment orientation [might makes right]
- 2. Self-interest orientation [ends justify means]
Level 2 (Conventional)
- 3. Interpersonal accord and conformity [make peers happy]
- 4. Authority and social-order maintaining orientation [make powerful happy]
Level 3 (Post-Conventional)
- 5. Social contract orientation [ends before pleasing others]
- 6. Universal ethical principles [ideology before individuals]
[suggested by Kohlberg]
- 7. [Transcendental or Cosmic] [focus beyond the flesh]
The way these stages work is basically a person starts life at the very beginning, then as experience finds a given stage to be insufficient, cognitive dissonance arises, leading one to seek solutions. Higher reasoning builds upon lower reasoning, so stages are progressed consecutively, without skipping. Generally a person progresses only if significant dissonance is found, and even then, only when higher reasoning is available. Later stages, in particular, can take years or decades to traverse, especially as one's habits have become deeply seated. Many if not most people stop somewhere before the last stages, presumably when no further show-stopping dilemmas are encountered.
Empathy is often referenced as synonymous with morality, but this is simply false. Rather, empathy is an emotion whose function is to share feelings between those of the ingroup. When someone from the ingroup is seen in pain, one perceives that pain through mirror neurons and feels it through empathy. This experience leads to an automatic understanding and motivation to alleviate or prevent suffering in others. A couple of important points ought to be given here:
One, empathy is disabled or diminished for members of the outgroup. Hence, when an undesirable is cast out and dehumanised, that person or group is no longer subject to receiving normal empathic consideration.
Two, empathy is only a heuristic substitute for morality. Its nature may be innate and automatic, but its logic and depth are limited like in other instinctual intuitions. Such gut instincts are understandable from a survival perspective, in large part for requiring little if any training or higher thought. But heuristics ought not be the final word when making important judgements for which higher reflection is possible.
The primary problem when someone lacks empathy, whether psychopathically by birth, or sociopathically by upbringing, is that moral reasoning must take the place of gut empathy. This issue is analogous to a person who lacks a sense of physical pain and hence must assess physical risk cognitively to prevent too much harm. No doubt, a higher mental burden is presented. As far as individuals lacking empathy, the real problem is when higher moral reasoning is unavailable, such as when (a) lacking intelligence, (b) lacking education, and or (c) lacking good examples.
In short, empathy covers for reasoning while reasoning covers for empathy. Having either gets the ball rolling on morality; but only higher stages of reasoning can solve higher moral dilemmas.
In the case of lacking self-control, a person may well have the right thoughts and right desires but lack the right actions. This is more a deficit of function than morality, similar to learning disorders. The goal for these individuals should be to prevent harm while facilitating positive action, like for persons with other disabilities.
In conclusion, evil actions are the result of ignorance; uncontrolled actions the result of disability; and moral actions the result of empathy or reasoning. Experience and education can supplement low empathy while good example can supplement low intelligence. A moral and just society is one who recognises which factors can be adjusted to provide the best outcome for the most inclusive circle.