Cleveland trades Deng to the Lakers for Gasol. The Cavs then flip Gasol to Phoenix for Okafor's insured contract and the least valuable of their 2014 first round selections.
Phoenix gets a guy to help them in the playoffs. The Suns can't realistically keep all the picks they've acquired and with Gasol's contract expiring they are not committing to anything long-term. It costs them the most financially of any of the three teams as insurance is currently covering 80 percent of Okafar's expiring deal. That said, the season is 60% over, so the numbers are not out of control.
The Lakers have been clear that they have no interest in retaining Gasol. Is Deng a better long-term fit there? It certainly gives them a chance to watch him up close to make a decision about going forward.
Finally, the Cavs dump a player who's not helping them this year and who has made it pretty clear that he's not happy with how the team is run (he's not going to sign a new contract with the team). They pick up a first round selection which they can use on someone like Andrew Harrision from Kentucky. Harrison was spectaular coming out of high school but has had a rough time of it in his freshman year in Lexington. He'll need time to develop but it's better than letting Deng walk and getting nothing.