Parshat Ki Seitzei
In 22:21:22 we go through various situations of adultery and rape, etc.
When the husband accuses the wife of not being a virgin, and they subsequently find the claim to be true, the Torah says she did a depraved deed and gets punishment of death. The Torah then says , "ובערת הרע מקרבך" - you should remove the evil from amongst you.
When the man has an affair with a married woman, they both get killed. There the passuk says, "ובערת הרע מישראל" - you should remove the evil from Israel.
What is the difference? Why does znus have to be removed from amongst you, while adultery has to be removed from all of Israel?
I do not have a good answer, so leave your suggestions in the comments.
The thought I did have is that adultery is a more serious offense than znus. Therefore the effect it has is not just on you and your community, but on all of Israel. Znus is more private and the offense is not as great. Therefore the effect it has on the people is more limited.