In the one example you provided, Chrisopher Boyce received 40 years for spying for the USSR during the height of the Cold War. He did not reach a plea agreement with the government. He maintained his innocence, perjured himself at trial, and was convicted.
Pollard received life for spying for Israel at the height of a US-Israeli alliance, in spite of a plea agreement. I think there is a tertiary reason for the "unusually harsh sentence", a visceral hatred of Pollard because he is an American Jew who betrayed American secrets to Israel. It is the explanation that makes the most sense, not his behavior at trial. Otherwise why Weinberger ?
Often asserted, never supported.