The reasoning behind this:
The Israeli soldier was innocent, young, and had a worthwhile life ahead of him. He was worth saving.
The imprisoned Palestinians were, many of them, deeply corrupt, dangerous, likely to kill again if they were released.
But the calculation was not done only on these terms, the good and bad of the individuals involved.
The decisive fact was that there is a near infinite supply of people who want to kill Israelis, and that releasing hundreds or even a thousand from prison would not significantly increase the danger to Israel. Saving one good man was worth releasing a thousand bad.
On one side of the equation, an unlimited respect for the individual, on the other, an unlimited indifference. The sides balance in a moment of history we have no reason to wish repeated.