Actually his contract is only 2 yrs $23mill. No one wants that $16mill option at the end. Not in place of the $1mill buyout.
Torres has played 55 games above A ball, and then destroyed his elbow. He'll probably recover fully, but he isn't going to be in your infield in April. Probably not May, either. So Castro is.
And really, there is a decent chance either Torres or Andujar or both fails to make an immediate impact. I know it's hard for Sox and Yankee fans to believe, but not all prospects hit the ground running. Some take a few seasons to get it together. Doubtful the Yankees unload everyone to pave the way for these guys. So by the time the Yankees unload Castro, he might be on a one year $12mill deal. So maybe he gets dealt, but he won't have a ton of value at that point...