They must joke because someone they know will die very soon, and they have to cover their fear. This adds to the effectiveness of the story because we have all seen people act this way. The next aspect of human nature that the author looks at, and that adds to the effectiveness of the story, is denial. As soon as her husband has drawn the black dot, Mrs. Hutchinson begins to complain that her husband wasn't given enough time to choose. This is something almost everyone would do.
Denial is typical of humans, and the author uses it to make the story more effective.
In a crowd the stoning can be justified by each person present because they can tell themselves that they didn't kill Mrs. Hutchinson. They only threw one or two rocks. Everyone else killed her. This kind of phenomenon accounts for deaths in British soccer matches every year. People fall and are trampled to death by other human beings.