Nitai HaArbeili says ,
do not associate with a Rasha (Pirkei Avos 1:7). Why not? Shouldn't
you try to influence him to become better? The Ba'al Shevet HaMussar
in his peirush on Pirkei Avos says that there is a far better chance of
him influencing you in a negative manner than vice versa. Why?
He
explains that the greater tzaddik you are, the greater your Yetzer Hara
is (Succah 52a). Therefore no matter how great the tzaddik, he has
equal forces within him. The Rasha on the other hand has cast aside his Yetzer Tov, and
his Yetzer Hara dominates him. By associating with the Rasha and allowing the
Rasha's yetzer hara to influence him, the tzaddik is tipping his already delicate balance. His yetzer tov is now outnumbered
two to one. Unfortunately despite his great tziddkus, it is likely
that the majority will rule or at least cause some damage.