Measure of a Man is legally and philosophically nonsense. It doesn't grapple with any of the history of questions around consciousness, and there has got to be dedicated JAG officers on the Enterprise who are better equipped to handle the case.
Riker takes off Data's arm and turns him off and that judge is like "you make a good point!"
Everyone except that ass scientist who made a case that Data isn't a person was faking being convinced and/or being convincing. To prevent the ruling from being overturned.
How about the position they put Riker in? "You will prosecute this case and you will do a good job of it and if you don't I'll immediately rule in favor of the prosecution."