"The Measure Of A Man" is DUMB. The trial should never happen in the first place because Starfleet had already acknowledged Data's status of a sentient and sapient being when he had been admitted into the academy. The alternative is that talking paperweights could become officers too, which is what that episode implies.

Mind you, Data as 2nd officer sometimes assumes command of Starfleets most prestigious starship on top of that.
Being man-made does very obviously not rule out sentience, while humans/ organic beings are essentially machines composed of "soft" materials. When Riker turns Data off, everyone is shocked and baffled as if he presents some ingenious, nearly irrefutable evidence or some bullshit. Picard is like, "He almost convinced me" totally ignoring organics can also be "deactivated" and altered in several ways. During Picard's torture in Cardassian captivity he is implanted with a device allowing anyone to cause him physical pain at the press of a button. Does that make Picard an object or pet without rights? What about cyborgs like Airiam and Rutherford, are they less? I do not think so.
Moreover, androids like Data are much harder to manipulate unless you are Soong or Lore with inside knowledge. He is the only one able to resist those energy beings from "Clues," he cannot be assimilated by the Borg... Laforge gets brainwashed at one point leading him to commit an assassination attempt.
In my head canon interpretation Riker is the hero in this story. He deliberately brings forward a stupid argument easy to debunk, but unfortunately, Picard plus pretty much everyone else do not get it due to a Q prank.
Besides, Riker being forced to represent Maddox seems odd.