Psst, those filmmakers knew that they could show an hour of sin as long as the sinners got theirs by the last reel.
Same game at play in Reefer Madness, Cocaine Fiends, et al. Skinny dipping, white slavery, VD, on and on. But it’s a “cautionary tale” (wink wink).
Some films (by the “other” Hollywood) even had two versions of scenes (one tame and one “hot”, like women in lingerie reading the same lines). Cities and states had their own local censors you had to get to pass your film (Baltimore had one into the 80s or 90s, John Waters had to deal with her numerous times). Sometimes the promoter would screen one print for the city fathers and then screen another at night (or even change up reels after the “heat” left the theater).
Urging morality WAS NOT THEIR GOAL.
It’s melodrama.
Have you seen "BABY FACE"? Oh sure, Stanwyck turns into THE WHORE WITH THE HEART OF GOLD", due to the "LOVE OF A GOOD MAN", but she isn't "punished" in any way.
"THREE ON A MATCH"? Okay, that's a bit into "CODE" territory, but it's still "racey".
Look at the early films staring Warren William, Kay Francis, and Norma Sheara, even in the early days when THE CODE was begun!
And as far as "racey" goes, the nudity in the silents beats the heck out of the "racey" talkies, where the women were at least wearing something !
Yes..."CAUTIONARY TALES"; these predate the invention of movies and has been used in books and plays for centuries, if not millennia.