In Star Trek, the computer is framed as an appliance. It's the ship's operating system. The characters treat it like a highly advanced Alexa. They issue commands ("Tea, Earl Grey, hot"), ask for information, and expect a transactional response. No one ever asks the computer, "How are you feeling today?" because the narrative has established it doesn't have feelings. It's a tool, and we, the audience, accept this premise.
In contrast, the entire point of Data's character is to question the line between machine and person. The episode you mentioned is a courtroom drama specifically designed to force the characters (and the audience) to see him as a sentient being with rights. His "positronic brain" is the magical Asimovian hand-waving that signals to the audience: "This one is different. Pay attention."
'The Author' could have easily positioned the computer or the holodeck in a similar manner and people would agree it was sentient. Or Star Wars droids could easily be given more of this kind of weight than they are currently given.
It's one thing to read a fictional story about a fictional technology and assume the position and framing the God is pushing you to, it's another thing entirely to have the technology in your hands and play around with it.