My father asked my grandson if he had done something wrong and my grandson responded "Did you see me?". In his mind, if you weren't seen then you weren't caught and if you weren't caught then you didn't do anything wrong.
Unfortunately, most of us have carried this concept forward into our adult lives. If we exceed the speed limit and don't get caught then we aren't lawbreakers. If we cheat just a little on our income taxes and don't get caught, it's okay. If we find something of value that wasn't ours and no one sees us, it's all right to keep it. If the clerk undercharges us, it's all right to keep the change. As long as you don't get caught, you are still a good person.
If you start slipping away from what is truly right, it becomes easier to repeat the next time. You can justify lying and cheating in your mind, especially if you never get caught. It becomes almost a game. There is a risk/reward element that plays with your mind each time you try. The ultimate result is that you cheat yourself. You find you didn't NEED to lie and cheat - you just enjoyed the thrill of getting away with something wrong. You lose some of your self respect and become less of a person than you know you could be.
The more you can resist the temptation to cheat "just a little", the stonger you become. You develop pride in yourself. You did good, even if no one was watching.