Because the salaries had to match to trade Ariza.
Basically it seems the suns wanted a replacement for Ariza. Brooks was their first choice because he had a low dollar contract for 2 more years. Oubre was the fallback plan.
Did they actually want Rivers and he threw a fit when informed he was traded to the suns, I don't know, but looking at his stats and the fact he would eat into the development of Melton/Okobo and had no chance of staying here, I don't have a big problem with it.
The Suns are in a weird place where they should try and win - but the reality is they cannot make the playoffs, and being one of the 4 or 5 worst teams one more year actually might be for the best.