http://revach.net/article.php?id=1507

Section:  Avodah   Category: Pirkei Avos
Pirkei Avos: Keep Yourself Smelling Nice

Nitai HaArbeili says, Harchek MiShachein Ra, V'Al Tischaber LaRasha" (Avos 1:7); keep far from a bad neighbor and don't associate with a Rasha. In Avos D'Rav Nosson it adds the word "even for Torah". With this Rav Chaim Brisker explains why Yaakov was kicking to get out of Rivka's stomach when she passed a shul. He says that although he was learning with the Malach inside her womb he had a terrible chavrusa in Eisav.

Why is merely being near a Rasha so terrible? After all what kind of ill effects can he have if no interaction takes place? The Bartenura explains that a Rasha in your presence will have bad effect on you even if you have nothing to do with him. He gives an example of a clean person who goes inside a tannery. While he may be clean person nevertheless when he comes out he will stink. So too being near a Rasha, while we think we haven't changed, we won't realize the spiritual stench that has overcome us. (Toras Chaim)