I think that it was inevitable for Corey to come into conflict with the court. When Corey was speaking quite cordially to Danforth about his prior experiences with Danforth's father who was a judge, Danforth does not seem to show any caring emotions. Corey, himself, believes that the court is rooted in a misguided pursuit of justice. Corey's own defiant nature towards Salem society would have invariably come into collision with the court. Recall that Corey would have provoked Danforth because his wife was taken into custody over something so small. A passing comment to Hale about his wife's reading habits caused her to be imprisoned. He would have raised questions about this and this would have been received in a negative light by Danforth, who could not stand anyone questioning his court or how the trial is being conducted. Corey would not have been able to silence himself at seeing how the trial is being conducted and would have said something in dissent. In the end, even without the accusation levied at Putnam, Corey would have come into direct opposition with the court and Danforth.