The overall reason why Arthur Miller wrote "The Crucible" was to protect his career. As a writer, he could have been blacklisted by the House of Representatives Committee on Un-American Activities.
By speaking out against McCarthyism, Miller was able to make a general statement about the so-called "witch hunts" that pervaded the government and Hollywood. This play helped remind people of the past and relate it to the present.
Miller was also able to convey a major historical event in a controlled manner. The Salem Witch Trials were a watershed moment in American Colonial history, with 150 people accused of witchcraft.
In 1953, when Arthur Miller wrote the play, he was talked about as one of the best playwrights ever. As such, he wanted to capitalize on his name. That year, he was awarded the Tony Award for Best Play.
After the success of "A Death of a Salesman," he followed up with "An Enemy of the People," but this play closed after only 36 performances. He needed to make his mark once more, and after three years came up with "The Crucible."