As a child, I learned to behave properly when adults rewarded my good behavior and punished my bad behavior. This worked pretty well because the reward or punishment generally came quickly after the behavior, making the relationship between the cause and effect unmistakable.