Interesting premise, but most spies are given life sentences, primarily because going on trial puts the government in a corundum: the majority of evidence is classified. Once it's introduced as evidence, it becomes public record.
That's why Hanssen and others are given lenghty sentences, or life without parole.