Mavs: Need someone who can score from the backcourt until Kyrie gets back, and get younger while doing so. Vassel can be an impact player now while also fitting into their young core and playing off of the stars when they're at full strength. He also give the Mavs athleticism on the perimeter they desperately need. PJ is a fantastic piece but will have bigger fish in front of him on the depth chart (Flagg and AD play his 2 natural positions, plus they still have Naji Marshall) so moving him makes sense.
Spurs: The backcourt is gonna get crowded this year if/when they draft Harper to pair with Fox and Castle; Vassel is the odd man out. They still need to upgrade their wing shooting where Klay can help tremendously. PJ is a strict Barnes upgrade in every way: an all-defense caliber forward with flexible offensive tools who can fit in any lineup next to Wemby and the talented backcourt. Also gives the team more cap flexibility, which may come up sooner rather than later.