Confucianism was about doing the right thing. This is a basic idea of law and order. People get punished when they do the wrong thing, and they are rewarded for doing the right thing. Doing the right thing helps people get along and achieve good conduct. By using reward and punishment on the basis of doing the right thing, this can influence a ruler's subjects to follow suit and compel those of legalist thought.