Gagne could be a bit of an enigma and had trouble staying on the ice in recent years, but he is a very good 2-way player. I am sorry to see him go.
I agree with andru - the move was about the cap and PT for giroux, zherdev, JVR, etc.
He was also the longest tenured current Philly athlete.