Why the Pelicans do it:
Mark Williams is a 7'0" 21 year old center, averaging 14/10 on 70% from the field, 71% from the line, in 27 minutes (and only 1 turnover per game). He fills a huge need for the Pels, and can contribute now. They stagger him with Jonas. He's cost-controlled until becoming a RFA in 2026 ($3.9m this season).
Trading CJ for Hayward is a salary dump as Hayward is expiring. Hayward can still contribute coming off the bench and shooting 3's. This frees up a massive amount of cap space the Pelicans can use to resign their players.
Why the Hornets do it:
CJ is better than Hayward, can help "build the culture" (assuming they buy into that), and they have him under contract a couple more years (assuming they would want that).
Two first rounders. The Lakers pick could be fantastic if Davis or LBJ misses a lot of time.
They can kick the tires on Kira.