Rationale for each team,
Raptors: Instead of using RJ's money to go after a big star, the Raptors cash in on the good statistical season that RJ had, take on the bad contract of Patrick Williams with the hope of turning him into something, take on Lonzo Ball with the hopes of him recovering to something of his former self to be a solid bench piece behind IQ, and they add another lottery pick in this years draft.
Financially this trade would also help the Raptors stay under the first apron for this season, as they would fill out their roster with whoever they take a picks 9, 12, and 39. Furthermore, this trade would also give the Raptors some cap flexibility into the future, and flexibility to resign Agbaji without breaking the bank for next season.
Bulls: This deal allows the Bulls to dump Patrick William's contract, add a solid rotational piece, and maintain cap flexibility for next offseason. RJ also still, as proven this year, has room to grow and given the growth of players like Josh Giddy this past year in Chicago, RJ may find room to improve on the Bulls.