I assume that Matt Benning is the retention in this trade.
If Liljegren's bonus was paid in July, he is only owed the what remains of his 1M base salary this season, and 2.6M next season.
They likely viewed Benning as someone who would eventually be played off the roster, and he is signed for two more seasons at 1.25M per. The Leafs can bury him and get back all but 100k of his cap hit. The Leafs don't care about real dollars, only cap - so this is almost like only have to retain 100k on Liljegren with the benefit of not burning a retention spot.
I am not saying Benning won't play for them, but I doubt they wanted him. He is the proxy for retention because San Jose is concerned with real dollars.
That's why the return was a bit higher than some people excepted. They got back what projects to be one of the highest picks in the third round. So this isn't a normal TDL late 3rd type return, it's much closer to getting a contenders 2nd.