The Hays Code prevented a much darker ending to The Bad Seed
If you can believe it, the original ending was actually much scarier.

The Bad Seed was such a popular book that it earned the pristine honor of getting a stage adaptation. Inevitably, the Broadway production became so successful that it was developed into a feature film in 1956.
Patty McCormack, better known as the film’s antagonist, Rhoda Penmark, shared an in-depth look at her character during a 2016 interview with the Abbeville Meridional.
”The character was presented to me as this little girl determined to get her own way, rather than a ruthless murderer,” said the actor. “Yes, I knew she was a killer, but you never see her actually kill anyone on screen, which I think made the film even creepier. If remade today, it would almost certainly be more graphic, which I think would ruin its appeal."
McCormack played Rhoda in both the stage and film versions of The Bad Seed. While both versions were well received, their endings were vastly different. The stage version was much darker, with Christine Penmark poisoning her daughter in an attempt to end her reign of terror, before taking her own life. This ending was scrapped due to film standards at the time.
"In the play, the mother shoots herself and dies, while Rhoda survives her mother's attempt to poison her,” said McCormack. “So no one was left alive who knew what Rhoda really did. But they changed that for the movie because the Motion Picture Production Code of the 1950s wouldn't permit movie criminals to go unpunished."