Danforth, although seemingly intelligent, thorough, well-read and an experienced lawyer and judge, suffers from pride, and it is that pride that leads to many of his erroneous and illogical judgments in The Crucible. He is kind-of logical in his reasoning for accusing so many of witchcraft at the behest of a group of hysterical girls. He states,

"Witchcraft is an invisible crime...who may possibly be witness to it? the witch and the victim...now we cannot hope the witch will accuse herself...therefore, we must rely on her victims [to testify]."

This is a very logical way to justify the illogical acceptance of the girls' afflictions as "proof" of witchcraft. In his way, Danforth is careful and thorough. He concocts the "bring Elizabeth in to confirm adultery" scheme, which on the surface, could be a good plan. However, he fails to realize or accept that it is, as Hale puts it, "a natural lie to tell" to protect one's husband.

So, even though he is occasionally "logical," overall, it is his pride that rules the courts. If you can put yourself in his position, and, having signed nearly 100 death warrants, if someone were to come along (like John Proctor) and prove his judgments wrong, that would ruin his reputation. He would, essentially, have wrongly murdered those that hanged, and never be able to work or show his face again. He protects his judgments and his court with a prideful fervor, that, unfortunately, despite his occasional logic and careful nature, makes him a dangerous man. I hope those thoughts helped; good luck!