I’m pretty active in genealogy and finding names for the temple. Recently I participated in some temple sealings on behalf of the dead. The ceremonies are essentially the same between the living and the dead except for the addition of the following words “Bro/Sis Brown in behalf of {fill in the name} who is dead”. What struck me was the question asked to the husband and wife being sealed together to the effect of “do you do this of your own free will and choice?” Of course an affirmative answer is expected. But if the person is dead, are they really participating in the ceremony of their own free will and choice, or is it the free will and choice of the submitter?
Now I know that Mormons believe that deceased family members can choose whether to accept the ordinance done on their behalf. So even if I say “Yes”, the person on the other side can say “No.” If that’s so, why do we bother with asking if the dead person does this of their own free will and choice? We have no way of knowing, right?

To me it seems obvious that it both mirrors the ordinance for the living and to teach exactly what you said in your post – that the ordinance is only binding if the dead agree to it.
Imagine if that phrase was missing – imagine how many saints (to say nothing of outsiders) would interpret it as evidence that the ordinance was binding regardless of the wishes of the dead.
We don’t know, but for the purposes of each ordinance we stand in proxy as if the deceased is in agreement. The same reason we don’t withdraw from an endowment session when the option arises. So if part of the ordinance requires that declaration we give it as though we were them.