People seem to think batman holds himself above the law. He believes in justice and the legal system. His goal is to bring criminals to justice, not exact his version of penalties like the Punisher. He is the best swat team/police detective in the world not juror/lawyer/judge. The traditional vigilante is one who takes justice into their own hands and punishes criminals without regard to the laws chosen by the people. Batman may use extreme measures to prevent the deaths the police couldn’t prevent but stops once the criminal is in the hands of the people. Basically, he’s a bounty hunter who wants to prevent deaths not collect money.
Also, the jokers kills are on the people of gotham’s heads not Batman’s. Arkham isn’t a prison he owns and runs, it’s the city’s. Batman knows he doesn’t have the right to tell gotham what to do with incapacitated criminals. To use a sentiment from the dark knight movie/long Halloween he BELIEVES in Gotham. He believes the people have a right to decide the fate of the criminals threatening them. If the citizens voted to allow capital punishment for the insane he wouldn’t break into the prison and save joker. It would be what Gotham wanted and so justice would be served.