There are two main problems if every hero adopted an all kill code.
The first one is taking the law into their own hands. If every criminal was killed for committing an act of crime, that would be messing with the law. The hero has no right to determine who has the right to live or not, that's up to the courts. Heroes are allowed to exist because they are able to put down the villain while trying to save as many lives as possible, effectively doing the police's job in taking down a criminal. The police force doesn't have the right to determine who is allowed to live, that goes for the hero as well. Every villain has the right to due process and their fate will be determined in a trial, not by the hero. If the hero keeps killing every criminal he sees, the hero will become just as bad the criminal for taking the law into his own hands like that and effectively becoming a murderer.
The second problem is there wouldn't be as many interesting villains. If every villain would be getting killed on the first issue or old villains getting killed would get boring. We all have our favorite villain and the only reason why he have that villain is the fact that the hero chose not to kill that villain allowing them to return. Great villains like joker, thanos, megatron, etc wouldn't exist anymore because they're dead, and trying to create a great villain to last one issue or story arc wouldn't turn out as great. It's a fictional world and thats why the villain is always defeated and always survives.