This trade looks like a loss for both teams but these are the reasons why its a win win trade.
Neither player has any value under the new CBA. Teams are prioritising draft capital and keeping their teams young, cheap and deep, so a better deal might not come for either team.
Hawks are playing better without Trae Young. Adding a veteran big that you don't have to hide on defence might be more beneficial for this hawks team.
Hawks get a draft pick for taking more money on and an injury prone player.
Mavs already fucked themselves with the Luka trade. Trading out of an injury prone big for an available point guard who is the second best passer in the league might be their best move.
Trae is on less money and a shorter deal so if it doesn't work out the Mavs can let him walk in 2027.