It had two purposes. It turned the audience against Trant. Arya is about to murder Trant in cold-blood, therefore the audience has to look at Trant as a someone who deserves killing and not just a soldier obeying orders. Otherwise, Arya becomes a villain. No one weeps for whores and spiders, but pedophiles don't…