Arthur Miller was very concerned about Senator McCarthy's communist "witchhunt" during the post WW II years. (I put that in quotes because, although it has always been held that McCarthy was incorrect about all his accuasations, there is new evidence that he was correct about some/most of what he alleged.) During this period he wrote an adaptation of Ibsen's "An Enemy of the People" which portrays the heroic efforts of a doctor to let the people know that the spas, source of their town's fame and income, is harmful.
Miller was fascinated by the heroic individual who stood up to the masses. Perhaps more to the point, he opposed the tendency and power of the group to turn on the individual in a witchhunt. Both "The Crucible" and "An Enemy of the People" were written to expose McCarthyism for what Miller thought it was.