Batman operates outside the law, so society's rules don't bind him. The only restraint is his own moral code. People are really good at justifying our own behavior, making exceptions and violations of rules we accept seem valid to ourselves. Batman doesn't want to go down that slope and become a murderous psychopath, so he made one iron clad rule and he sticks to it at all costs.
I think those who mentioned Rorschach and Nietzsche are spot on.
I think those who mentioned Rorschach and Nietzsche are spot on.