Even highly educated people can be stupid beyond belief. Einstein was a socialist who thought Lenin was a great man.
It’s not stupidity, it’s evil. Once you have decided to pursue some evil goal, your mind will automatically find ways to rationalize it to yourself to quiet your conscience.
Believing your own rationalizations is foolish, but not stupid. We all do it, to some degree or another, whether we realize it or not. It’s just how our minds work.