Why Heat does it - Jimmy Butler has already requested a trade, and Miami doesn't want to completely blow it up with Bam and Herro. Jimmy at 35 is not gonna get you many draft assets, so the try to extend their window by getting a 6'10" sniper in MPJ. They also take a stretch big in Saric, so they can experiment with Bam at the 4. You don't get much worse with Jimmy not playing 100%.
Why Nuggets does it - With all the money allotted in the top 4, the nuggets aim to be a contender, and getting Jimmy can do so. He is a large ceiling raiser, and he can lead second units when Jokic is off. You get off 1-2 years of MPJ and Zeke Nnaji's contract, and make a bet that Jimmy can elevate your team higher in the standings. The nuggets don't have future pick equity, so this is probably the best player you can get without giving up much. You also get a nice bench scorer in Alec Burks, who can steal minutes from Julian Strawther, especially in the playoffs.
HEAT LINEUP PG - HERRO SG - ROBINSON SF - MPJ PF - HIGHSMITH C - ADEBAYO
BENCH PG - ROZIER/RICHARDSON SG - LARSSON/SMITH SF - JAQUEZ JR PF - JOVIC/LOVE C - SARIC/WARE
NUGGETS LINEUP PG - WESTBROOK SG - MURRAY SF - BUTLER PF - GORDON C - JOKIC
BENCH PG - STRAWTHER SG - BRAUN/BURKS SF - TYSON PF - WATSON C - JORDAN