ונפש כי תחטא ושמעה קול אלה
If a Man sinned and heard an oath
The Sefer Taam V`Daas brings a Medrash (Tosefta Shavuos 3:3) that says, “Rabbi Elozar Ben Masiah said: One is not condemned to see, unless one sinned. As it says, “ונפש כי תחטא ושמעה קול אלה” [ – this implies that a man will only hear an oath if he had previously sinned.] In a similar vein he also said, “Someone who see’s sinners, was condemned to see them, Somone who sees good deeds being performed, was awarded seeing them.”.
We see from here that ‘just’ seeing bad deeds has an effect on our purity of heart!
When we see it being done, the gravity of sin melts away. “If someone else can do it” says the heart, “so can I”.
Only one who has sinned is punished to see sin. A righteous person will not ‘happen’ to see sin.