It is sort of a win-win. But it's also a strangely bad deal in some ways.
The Leafs cleared like $7m+, which would be great, but they immediately spent most of that on Cody Ceci, who was a bad fit. It wasn't actually a 1 year cap dump of Ceci, like many claim. The Sens had just given him that qualifying offer before the trade, so he wasn't a dump to them.
How often is it a "win-win" when a team takes on a piece that it considers a dump, and the team giving him up actually wanted him at that salary?
Connor Brown is a good player too. Leafs fans can say he isn't needed there but there's no question he would be playing a big role in the playoffs for them.
Since the Leafs didn't get any immediate cap benefit from the salary dump (it was wasted on Ceci and the difference between Kadri and Barrie+Kerfoot), they would have been better off waiting a year to make a big salary dump. Who knows, maybe Connor Brown would have been just enough to get them through Columbus and on to the next round.