Ainge may or may not have heard about the Cavs making/taking calls on Irving, but I don't think it influenced the decision-making there. Avery was the only one of the three trade-candidate perimeter guys who made enough money to 1 - allow you to take back a different useful veteran that you could credibly plug into a starting lineup, 2 - reduce payroll by enough that Yabusele's cap hold was also accounted for when, 3 - also clearing enough payroll to give Hayward a full max contract. Also hurting Avery's case was the fact that he'll be a UFA next summer while Jae's signed for two additional years beyond this one while Marcus will be an RFA - of course, that's been rehashed to death everywhere, but just bears repeating.
Avery was always the guy who made the most sense to trade, and it really wasn't about anything in particular that he did or didn't do on the court.