At every step of the journey, for all the characters, moral choices ultimately
effect the outcome of the Quest. All the way back to Bilbo not murdering
Gollum in the dark (at a point when he knew nothing of the ring's power or
meaning). At different points Bilbo, Aragorn, Frodo, and Sam all have it
within their power to kill Gollum...and must choose not to for the Quest to
ultimately succeed. This is not about practicality, but ethics, and "the
Good." Similar choices are evident throughout the books...Aragorn will
not kill an unarmed and unaware "old man" even though he may be Saruman.
Theoden does not execute Grima Wormtongue. Aragorn, Gandalf, et al do not
kill MoS before the gates of Mordor as he has the protected status of an envoy.
Frodo stays the hobbits from executing Saruman. For Bilbo, Frodo and Sam,
the decision not to kill Gollum is one of mercy and pity - they have no
forknowledge of his ultimate role in the destruction of the Ring. Gandalf
has only said that his heart "fortells that Gollum has some part to play, for
good OR ill" (paraphrased quote, emphasis mine).
Sam may be tempted - he is "human" after all - but that he stays his hand out
of pity makes the destruction of the ring possible. Had he chosen
vengence, violence, even "the practical" the Quest was
doomed.