Why the Spurs do this:
The Spurs currently have three point guards that all should be playing starter level minutes. Out of the three, De'Aaron Fox is the obvious one to be moved. He's the oldest of them, he was terrible in the finals and his contract is really bad, and will hurt the Spurs ability to retain their younger guys in the future. His value is probably at his lowest right now coming off that finals run, and considering his 5 year contract is just starting, but imo the Spurs should be urgently looking to move off him for the sake of Harper and Castle's development and production.
The Spurs need a bit more size next to Wemby at the 4, as well as some more shooting if possible. They would also need to get a decent backup guard if they were to move off Fox. This trade fills all of those holes. Jabari Smith is 6'11, athletic, a solid defender and a pretty good 3pt shooter (36% on 5 attempts), with the capacity to get better at those things. He's 23 years old so he lines up with the Spurs timeline better than Fox. He's not on the best contract, but $122m over 5 years is much better for them than $221m over 4 years. Vanvleet is coming off a torn ACL, so he is a bit of a risk here, but he'll most likely still be more than capable of being a good backup PG for a contending team like the Spurs. He's proven to be capable of performing well in the playoffs and providing some stability. He's on a big contract but only for this season, and if he's good enough the Spurs could definitely look at retaining him on a cheaper deal.
Why the Rockets do this:
The Rockets were without a PG all last season, and it really harmed their offense. Fox has proven capable of being a lead guard in the past, bringing success to a pretty miserable franchise in Sacramento. His value is probably the lowest it'll ever be right so its absolutely a buy low situation for the Rockets, and he'll be of much more value to them than he is to the Spurs. Fox brings a level of pace that not only fits what the Rockets have done for the last few seasons but would elevate it quite a bit. Giving up Vanvleet for a younger, better point guard for the long term is good for the Rockets, even if that contract is bad. And giving up Jabari Smith isn't really gonna be a problem considering the forwards they have on the team with Amen, Eason (if they bring him back) and KD (or whoever they get back in a possible KD trade). Because Fox's value is so low at this point, they'd take on an unprotected 2027 Atlanta first. With the new lottery odds greatly benefiting mid level borderline playoff teams, this pick could end up being incredible valuable, rather than being a mid first rounder like it likely would've been with the previous odds.