The Tampa Bay Lightning were looking to create some cap space. The Lightning were looking to keep Ondrej Palat, Jan Rutta and Nick Paul, who they'd already extended. To do that it meant a major piece must go out to create that space.
Ryan McDonagh, who was a member of the Lightning leadership group, unfortunately became the cap casualty. Luckily for McDonagh his full no trade clause allowed him to dictate where he'd be traded.