Shaq, JO, and Perkins can't finish on the floor at the same time. Not when you have a core 4 of Rondo, Ray, PP, and KG. Since this is the case, it had to be an easy decision for Ainge once he found out who he could add to the bench (Green and Krstic).
No brainer trade. Ainge made this possible by acquiring Shaq and JO in free agency. Perkins and his knees became expendable at that point. The new guys give you just what Perkins gives you at the Center spot, except better offense. Perkins is canceled out with the additions of Shaq and JO. So not only do you keep (or better) the center position in tact, you gain Green and Krstic for the bench, and a future 1st round pick down the road. Easy trade. For now, and the future. Plus, you won't have to pay 9M per for 1 player whose coming off major knee surgery and only gives you like 4-8 points per game.