Actually the Hays Code was started in the early 1930s and enforced by the studios themselves starting in 1934. Hence movies made before 1934 are often called precode. But that doesn't always mean their more racy, though sometimes they are.
The Hays Code was a positive factor in many ways as it forced the studios to focus on quality in stories and character development. If the Hays Code never came about, film makers would have followed the trend of selling tickets by showing women in the undies, over the top violence, etc. If titillation is all that we get from a film maker, than a lot of the art of cinema would be lost.
Joan Blondell in her undies in the precode film Night Nurse (1931). After 1934 such scenes would not be allowed for 2 decades.
I disagree. To wit, no censorship > censorship, almost always. There will always be people who are only in it for a buck, and if they can't use sex they'll use something else. And it's not as if sex wasn't used to sell movies during the Hayes code, they just had to be a little bit more covert. See: any number of cheesy sci fi b movies.
At the same time, there will always be people who are interested in telling a good story and treating cinema like an art. The content that should make it into a piece of art should always be the decision of the artist. Some artists will make tripe that relies on smut, sure, but artists who know what they are doing will be able to make the decision on what content to include, and how to bring their vision to fruition in the best way possible. Sometimes, that will include sex and violence. I don't think that sex and violence on their own are indicative of bad art either. See: my top ten. Whenever the government tries moralize art, they make a step towards killing creativity, and **** gets ****ed up.
Also, if you want to actually look at the rules of the code, they were pretty ****ed up and racist/a lot of other things.
For instance, under the Hayes code, these were either not allowed or specified as "Be Careful".
White slavery (you could show black people being enslaved, but not white ones)
Miscegenation (sex relationships between the white and black races)
Ridicule of the clergy
etcetera.
Furthermore, if it took removing offending content from American cinema to drive people towards good storytelling, why was French cinema so fruitful during the period? I mean, there are some pretty racy 60s films from the country, and some of them are masterpieces. Of course, this is subjective, but foreign film is much more interesting than American cinema from the 30s-60s, with a few exceptions.
At the same time, some of the best American films of the period were the ones that pushed the boundaries (see: Psycho). And, a lot of really great films were made just after the Hayes code was abolished (see: A Clockwork Orange, The Godfather).