One of the fundamental questions in ethics is “why be good?” This question certainly seems to assume that people need a reason to be good. This would seem to entail that people would prefer not being good. For the most part, philosophers have accepted this assumption and have attempted to give people a reason to be good rather than bad.
The answers given to this question tend to fall into two main camps. The first consists of external motivations to be good. The second consists of internal motivations.
External motivations are, of course, motivations that come from outside the person. The most common of these is the practical answer to the question: be good to avoid being punished. This sort of answer is commonly given in a religious context: people should be good so as to avoid divine punishment (such as hell) and to receive a divine reward (such as heaven). Naturally enough, this motivation need not rest on the divine. After all, people can punish each other.
On the plus side, this answer provides a clear motivation to people. After all, people prefer to avoid being harmed and generally like being rewarded.
On the downside, if someone can (or believes they can) avoid the punishment, then this would not motivate them. Also, if the motivation is based on a religious view, those who do not share that view will not be motivated by this divine threat.
A concern about this motivation is that it is not a moral motivation. Rather, it is a purely pragmatic motivation. It is not based on a commitment to do good but rather a commitment to avoid harm and reap rewards. As such, a person who behaves ethically because of this would seem to be a pragmatic person rather than a good person. After all, if doing evil would enable him to reap rewards and avoid punishment, then he would do evil deeds. This applies, of course, even in the religious context.
Interestingly, those who are good because they believe that God will reward them for being good and send them to hell for being evil are not actually good people. They might do good deeds, but they are not doing these deeds because the deeds are good. Rather, they are doing the deeds because they expect to get a payoff and avoid punishment. If these people are not good, then what are they?
The obvious answer is that they are practical, self-interested and perhaps even selfish. They are not doing what they think is best, but doing what they think is best for them. This is really no different from obeying a tyrant or a gangster out of fear of punishment and hope of reward.
The second camp consists of internal motivations to be good. The usual answer given by philosophers is that doing good will make a person happy. Of course, it might be pointed out that this reason to be good also seems to be self-serving: if a person is good so as to be happy, then her motivation is to be happy. Presumably if being evil made her happier, then she would embrace evil.
The standard counter to this is that happiness depends on being good. For example, Aristotle argued that to be truly happy a person would need to be virtuous.