rough estimates on picks: #21 this year (Twolves), #28-30 next year (Pistons), and #33-35 next year (Nets)
Pistons get starting caliber players at 2 positions of relative need, PF and SG. Levert is injury prone and on a shorter contract than either of the guys we're trading. This helps them lock up a win-now core that matches their contention window/timeline.
Mavs do it for the draft capital (that isn't tied to their own results, allowing them to make progressive moves) and some flexibility in next years cap table, when there should be some big FAs hitting the market.