A passage in the Tanya speaks of the paradoxical way in which a person who grasps something with his understanding encompasses, and is encompassed by, the material he is studying.
Merely by dealing with any subject, one is in it and out of it at the same time.
To know is therefore a many-faceted experience, being, as it is, of the inner aspect.
Man thus cannot separate himself from what he knows, and though he distinguishes the good well enough, what he has imbibed causes conflict.
Indeed, it is a veritable war that is initiated by the act of knowing, like the strife of the twins in the womb of Rebecca, wife of the Patriarch Isaac: "And the children struggled together within her" (Genesis 25:22).
When the struggle against evil is no longer a battle against the outside, when it becomes an internal one, the nature of it changes to civil war.
In such a situation, there is an obfuscation of frontiers between good and evil, even if there is no dimming of the clear distinction between the two, and so it becomes difficult to maintain contact with what is right.
Indeed, the true Tzadik is the only one who can so completely cut himself off from the evil that there is no possibility of temptation, great or small.
–Rabbi Adin Steinsaltz
From In the Beginning by Rabbi Adin Steinsaltz