This sort of views it from the perspective of focusing on Data alone, but what I'm focusing on is the other end of the dynamic, entrance into Starfleet. This is an act not undertaken by objects, enrollment, enlistment, undertaking a place in the academy, that very likely eliminated another candidate from entrance, bestowing of ranks and posts, that others could hold insteadWe don't actually know the specifics of Data's backstory from the point of being discovered to joining Starfleet. Data may be programmed to think he "chose" to join Starfleet Academy, but really it was just a machine copying what it was familiar with... Starfleet found him, the computer imprinted on Starfleet.
He "agreed" to the same stipulations, but would not be bound by them as he is not a person, and has no rights, also due to not being a person. An object has no rights. Your replicator has no right to refuse your request and decide to no longer be a replicator. Data is just a fancy, mobile computer core that was programmed to mimic the behaviors of a person.
I don't know much about law, but it's kind of like the Miracle on 34th St. loophole. (which I realize is also fictional law) Because the state recognized him as Santa Claus, the state is already recognizing him as such & therefore he is such, ipso facto. (If I'm using that right lol)
They've already granted Data the recognition of a being & not an object, by placing him among their ranks as if he were any other being.