Mavericks takes a massive gamble on Klay while also dumping some salaries for the upcomming Free agency.
The Warriors would still be over the cap even if they lost Chris Paul and Klay next offseason. This makes any sort of moves very hard. So they would either have to extend both or sign players on cheap deals. In this trade they get a backup big, a knockdown shooter in THJ and a wing for the future in Green.