If the Boston Celtics trading Courtney Lee came as a surprise, it was only because the move was initially agreed to on a Sunday evening more than a month before the trade deadline.

Lee, like most (or all) Celtics veterans, has long been in danger of being dealt. His signing came during a time when the organization’s approach was different, when president of basketball operations Danny Ainge was trying to surround Paul Pierce and Kevin Garnett with mature role players who could consistently give solid minutes.

Though Lee did not succeed in that role last season, he was better this year. But his days were numbered regardless. The role he was signed for no longer exists in Boston. Really, his hot shooting only made it easier for the Celtics to move him.

They did so Tuesday, officially agreeing to send Lee and a 2016 second-round pick to the Memphis Grizzlies for guard Jerryd Bayless. The Celtics also received small forward Ryan Gomes from the Oklahoma City Thunder, but have already waived the 31-year-old small forward.

Money talks

Though multiple reports indicated the Celtics have eyed Bayless, 25, for a while, they did not make this move for basketball reasons. Bayless has been bad, with a career-low assist rate and shooting percentages (37.5 percent from the floor, 28.8 percent from the arc) that could turn a puppy rabid. The Celtics will be his fifth team in six seasons.

His contract is expiring, though; the trade allows the Celtics to shed a little more than $1 million this season and, more importantly, about $11 million in future salary (the amount Lee is due over the next two seasons). The trade alone will not make Boston a real free agency player this summer, but should give the Celtics a little room under the cap. They now also have a little wiggle room under the cap this season, if they want to acquire extra salary.

What does it mean basketball-wise?

Unless head coach Brad Stevens can whisper sweet advice into Bayless’ ear, turning him into a more effective player, this deal made the Celtics worse -- though I don't think much worse -- in the short term. Of course, wins have never been the primary goal this season.

Lee was shooting very well (49.2 percent from the field, 44.2 percent from the arc) and providing a nice scoring punch off Boston’s bench. His minutes will now presumably be spread between Bayless (suffering through a miserable shooting spell), Keith Bogans (who scored his first points of the season Saturday, in Boston’s 34th game) and MarShon Brooks (who was assigned to the D-League last week).

Assuming Bayless wins Lee’s minutes, he could be a better fit in some ways. The former Arizona Wildcat is more capable of serving as a primary ball-handler, which should be a particularly helpful trait while Rajon Rondo remains injured. But Rondo is due to return sometime relatively soon, maybe even this month. Whenever he gets back, Jordan Crawford should be forced into the second unit, taking playing time away from the other guards on the bench – including whoever replaces Lee.

That’s part of why downgrading from Lee to Bayless (or Brooks, or Bogans) should not do much to change how many lottery ping pong balls the Celtics earn (should they miss the playoffs, which is now looking more likely by the day). Even if Lee had stayed, he might have been phased out of the rotation after Rondo’s return. At the very least, his minutes (which he had already complained about) figured to go down.

But again, this trade had little to do with the present. The Celtics saw an opportunity to clear some future cap space and seized it. For that, they earned a…