Do wrong knowingly, and you still have the power to correct your mistakes. The ignorant can only rely on social convention and good fortune for not getting themselves into more trouble.
But when you knowing do wrong with the intention of making yourself ignorant of what is right, we say you have done evil. You have deliberately made yourself powerless to do better.
When we say it is better to do bad knowingly, we don't mean knowing how to make ourselves ignorant of the distinction between right and wrong. We mean it is better to do bad and be reminded we must protect our ability to do good.