There are many reason why a person would strive to “do the right thing” in any given situation. They are as varied and numerous as there are people on the planet. Or at least we would like to think that. I believe that, in essence, there is really only a short list of meaningful “why” one wants to “do the right thing.”
The first would be because we are taught from a very early age both through religious/social/cultural teachings and through life experiences that we tend to get what we give. When a person spends their time doing things they know they should not be doing then they end up dealing with the consequences of those actions. They also put themselves in the position to have those ever same things happen to them. So over all I believe people strive to do what is right so that they are treated right.
A lot of “doing the right thing” is wrapped up in our own self-esteem. When we do what is socially and culturally accepted as right we get a feeling of being a better person. It gives us a feeling of fulfillment and meaning.
Another important factor is self-preservation. In many cultures around the world, our actions reflect how those around us react. It is not uncommon in some places for an individual to be banished from his or her family and/or community if they act in ways that would be considered unethical or against the norm. If the action is considered “wrong enough” a person might even be considered a criminal and forced to be incarcerated. When we perform what is perceived as right, then our community sees us in a positive light. We gain the respect and trust of our family, friends, communities, and businesses. And through gaining this respect and trust we are able to prosper, living a better life than someone who is seen as doing the “wrong thing” all the time.