No government censorship was already in place at the local level. In 1915 there was a Freedom of Speech challenge to local censorship which landed before the Supreme Court. The Supreme Court ruled that Freedom of Speech did NOT extend to films. This kicked things into high gear and State censorship boards started to come into existence. One of the reasons the MPPDA (which later became the MPAA) was created by the film industry was to fight government censorship. The first industry "code" was created in the 1920's by the MPPDA before the Federal Government even considered stepping in. The Feds didn't even start making noises about it until the 1030's. There was no ultimatum issued by the government but the film industry could see the handwriting on the wall and acted to stop the government. The Production Code was more restrictive than anything the Fed was considering and the Fed being the lazy bastidges they are, saw no reason to continue after the Production Code came into existence.
The advantage to the motion picture industry is that rules set by an independent non-government agency, as strict as they were, can and will change but if an government agency makes a rule it is a rule for the next thousand years. This is why in my state I am required by law to pull over to the side of the road and turn off my car's engine if a horse drawn vehicle ever over takes me on the road, and it is illegal in a neighboring state for a woman to drive a car unless she has a man walking in front of and another behind the car carrying lanterns to warn other motorists that a woman is driving. People can argue that the rules and ratings as set forth by organizations like the MPAA and ESRB are behind the times, and that may very well be true, but they are lightyears ahead of where they would be if the government was running things.
But the whole point is, that if given the choice, an American publisher will censor itself before they let some unknown and faceless civil servant in a cubicle do it. It is just the way they think.