I agree with Matt. The whipping in front of the town, and its brutality, was meant to terrify anyone who might have thought of stepping out of line and exposing the town's crimes.
It won't surprise viewers of this thread, since I, you know, started this topic, that I still find the rape to be unnecessary. To me, it doesn't really add much to the movie, since the theme of The Stranger coming to punish the town is already so well developed. In many ways, I think the rape scene makes it harder to like and root for The Stranger character because I personally found the rape to be so disturbing. It was a very difficult scene for me to watch, even now, all these years later, and after many repeat viewings. But what I also found disturbing, and wasn't sure if I'd noticed it before, was how dismissive people were in the town about the rape. It just didn't seem like that big of a deal to most of the people. Like Matt, I was also disturbed by the fact that the women in the town seemed to still be so attracted to the Stranger. I know he was rugged and manly and all that, but he had raped a woman in the town. To me, that felt false, or was this reflective of the time? Was that dismissive attitude toward rape characteristic of the time?