This trade makes little sense for both Toronto and Memphis imo. Parting with Ed Davis makes little sense for Toronto.. He has great potential to be a serviceable big man. With more development he could be a 20 and 10 player. Adding Gay doesn't change much for them.. They're ceiling now is a 5-8th seed next season. Doesn't drastically change their position at all.
As for Memphis, they add another big. Gasol, Davis, Arthur and ZBo? I don't see how they're gonna properly allocate their minutes. Would have made more sense if they traded Gay for a wing player.