Doughnut Jimmy said:
If you see Terry's later books as fables (as in there is point to them about humanity or how the world works) then it is important for our sense of justice within the book that Stratford dies because he viciously murdered the goblin girl, the law couldn't have executed him for that even if he'd made it to court.
The law doesn't execute people. People execute people. If Stratford were tried under AM laws, he would be guilty of killing a sentient species. It would have been easy to prove the goblins' sentience--after all, Sybil made sure the entire world was aware of it.
So, Stratford would have been brought to justice, since Vetinari, for all his faults, is one who is extremely sensitive to species-related intolerance (and someone who would have seen the value of earning the trust of a population of obedient, nonviolent, highly skilled artisans who would be willing to work for cheap). Had he not brought Stratford for justice, he would have been villified by everyone who had seen the goblin girl play the harp in AM. He, of all people, knows where the political winds blow.
And even if Stratford could not be brought to justice in a trial, Vetinari would have found a way to make sure Stratford chose to choose the door to nowhere.