The spanking scene ? which occurs after the movie and after the stage-styled curtain call ? can not logically take place after the final events of the film and is unrelated to any theory of punishment regarding the story. We've already seen how a little sociopath is punished: 1) The mother attempts to kill her and 2) God finally does so by electro-barbecuing the little girl on the pier.
I view the spanking scene as a triptych event:
Panel the first: It was a joke between actresses who were friends off stage. (Interesting Patty McCormick interview on the DVD.)
Panel the second: The actresses were poking fun at the ridiculous "Hays Code" of the period which required a film to never portray "crime that pays." (To extend the Hays Code, to spoof it, we will even punish the child actress after the film.)
The Hays Code resulted in the changing of the story itself. In the novel, the child lives on, to perpetuate evil while the mother dies. In the 1956 film, the final outcome is reversed. The problem was rectified in the 1985 version.
Panel the third: The spanking was not a melodrama pressure release valve of any sort, but rather an ingenious deconstruction of the "4th Wall."
The major problem with the film is that it was overplayed ? as if the actors were performing on a live stage. I willingly look past this problem, since most of them had been performing The Bad Seed as a play before the film adaptation.