Don't you think there's also the, slightly uncomfortable, notion of Gandalf believing Faramir was worth more than 'normal' men?
Gandalf knew Faramir; he didn't know the nameless soldiers. Gandalf knew that Faramir was a brilliant man; he could only suppose that the nameless soldiers were good men though, equally, he probably supposed that they were not as special as Faramir.
It's a classic moral dilemma. I'm not going to judge on it (yet

) but I wouldn't rule out the possibility that Gandalf's decision was to do with judging the lives of some as lesser or greater than others.