And Picard and Riker wouldn't be arguing the pros and cons of Data being a sentient being. It's not dramatically interesting to suddenly show a trial being conducted by characters who are completely unfamiliar to the viewing audience. You just have to give the show leeway on this.The script may say it was within his authority, but the idea that a victim and principal witness in a criminal case could have any involvement in the prosecution or disposal of that case is absurd. It would mean automatic recusal in any credible justice system today. Imagine if a district attorney's office was taken over by terrorists and the DA was tied up, beaten and threatened with death. The case would be handed off to another jurisdiction to prosecute, for reasons I hope would be obvious.
But TOS very much depicted an "Age of Sail" type of galaxy where Kirk often didn't turn people over to the authorities because he was the authorities. It was a much less bureaucratic galaxy than that depicted on TNG. Starfleet Command wasn't always readily available via comscreen and there wasn't a Starbase around every corner. Many of the places that Kirk called on hadn't seen and Earth ship in years. And everyone on the ship had been victimized by Khan to some degree. When it came to the final authority in the matter, Kirk was it.