It's not a wrong decision by the Spurs. It's honestly good and better for the team in the long-run. There's no point in keeping a player that isn't interested anymore to play for the team. Kawhi loves that trades. Just too bad for DeRozan as he truly loves the city of Toronto Raptors and that trade really surprised him.
You are right, when Leonard got back from injury, I think he hasn't played anymore (correct me if I'm wrong) because he wanted to get traded, Leonard has talent and he had proven that many times but he is not a good fit for the Spurs anymore since he is not interested to play.
However, people look two this way.
When Leonard was in spurs, he won one championship and has become the NBA Finals MVP.
When he got traded to the Raptors, he does the same.
While when DeRozan was with the Raptors, they never went into the Finals as they were dominated by Lebron every time in the playoffs.