In act 3, Giles Corey is removed from the courtroom after speaking out during the proceedings against Thomas Putnam for attempting to grab land. He eventually gives Deputy Governor Danforth a deposition stating that an anonymous man overheard Thomas Putnam telling his daughter to accuse George Jacobs of witchcraft so that he could buy his forfeited land. When Deputy Governor Danforth insists that Giles Corey provide the name of the man who overheard Thomas Putnam, Giles refuses to comply with Danforth's request and is arrested for contempt of court.
Given Giles Corey's confrontational personality and the fact that his wife is on trial for her life, one could assume that he would have still challenged the court's rulings and suffered the same punishment as he did accusing Thomas Putnam. If Giles Corey were to remain silent about Thomas Putnam's wicked intentions, he would more than likely join forces with John Proctor and attempt to save his wife, Martha. Toward the beginning of act 5, Giles Corey initially tells Deputy Governor Danforth that the girls are telling lies about his wife. Giles's innocent statement and defense of his wife is enough to upset the authoritative, callous judges, who are only concerned with maintaining their positions of authority. Deputy Governor Danforth would more than likely consider Giles's defense of his wife an attack against that court and arrest Giles. One could also surmise that Giles would share the same fate and be sentenced to death because he would remain opposed to Salem's court.
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.