The Miami Heat are owners of two bad contracts they would likely want to get off of, but Duncan Robinson's is much worse than Kyle Lowry's. As a result, they could look to trade him this summer, even if it costs them assets. Should that be the case, the Spurs would make an ideal trade partner. They have a few expiring contracts, including McDermott, and would probably be willing to part with him if it meant taking back a long-term salary in exchange for more picks. The Spurs could trade McDermott to the Heat for Robinson and a protected first-rounder.
Taking on the final three years of Robinson's contract for a first-rounder might not seem all that appealing, but it's a better deal for the Spurs than it might seem at face value. McDermott isn't worth a first-round pick by himself and isn't likely to be part of the team's future. Moving him in any deal for a valuable asset seems like a wise use of future cap space, even if Robinson is a net negative.
The salary cap will continue to rise dramatically after next season, and his contract will take up an increasingly smaller percentage of that space as time goes on. Then there is the fact that the Spurs have a history of rehabbing players' value. Who's to say Robinson doesn't reemerge as a valuable asset in San Antonio and eventually make himself flippable on the trade market?
The Heat can't necessarily wait for that to happen since the East has become more competitive, and they have fallen behind the pack. Not to mention the new CBA, which benefits teams like the Spurs and hurts teams like the Heat. All of that works in the Spurs' favor and increases the chances of a deal like this getting done.