The deal was a way for the Leafs to get out of the underperforming Phaneuf's massive contract that still had 4 years remaining at 7 million per season. Phaneuf was brought to Toronto under Brian Burke who preached "truculence and tenacity" and while Phaneuf brought those elements to the Leafs, it was at a time where the game was moving in a different direction. The game began to move away from the era where players only had to be big and strong, gradually shifting more towards what we see today - a game that requires players to be more mobile and to move the puck quickly.
Phaneuf only lasted a season and a half in Ottawa before he was sent to LA where he was eventually bought out at the end of the 2018-19 season.
The players the Leafs got in return were essentially sent to Toronto to make the deal work salary-wise. Jared Cowen never played a game for the Leafs, while Milan Michalek played a total of 34 games with the Leafs and Marlies over 2 seasons before going to play in the Czechia (then, the Czech Republic).
Colin Greening played 30 games and posted 15 points in his only season with the Leafs, but was a mainstay on the Marlies for 3 seasons, helping them win a Calder Cup. Tobias Lindberg played 6 games for the Leafs before bouncing around the AHL for a few seasons and eventually going back to Sweden.
Finally, the second round pick the Leafs got in the deal turned into Eemeli Rasanen, who the Leafs never even signed. He is currently skating in the Finland where he has amassed a grand total of 0 points in 26 games this season.
All in all, the Leafs made this move to pivot the franchise in a different direction, and "tank" the upcoming season to have a shot at landing Auston Matthews, which has worked out pretty well so far.