Star Trek TNG question on "The Measure of a Man"

could Data even pass the Turing test

You could trick him with a common English idiom he hasn’t heard in his 20 years at Starfleet

It should be noted that the writer of the episode, Melinda Snodgrass, was a practicing attorney before she started working as a writer. So I’m pretty sure she was a aware of how legally stupid this looked. The real answer is that it was just more dramatic that way. There is conflict and tension in Riker having to argue against the rights of his friend, and that he succeeds so well is both terrifying and noble (since Data would have been summarily ruled against if Riker had refused to participate or tried to take a dive). Having some legal advocate attached to the Enterprise, or even Maddox himself, argue the case would have been far less interesting. The rules of drama trump logic. And the episode sold the whole thing pretty well.

My friends and I have joked that there don’t appear to be any lawyers in Starfleet, as this kind of thing seems to happen all the time. The other example I can think of off the top of my head is when Sisko had to defend Worf in “Rules of Engagement.”

There’s at least one.