Let me first say I love Daniels and would love for him to stay with the Mavs and get more playing time; however, avery doesn't like him so this wont happen.
That being said, this was a great deal for the Mavs. They already fished him in a sign and trade for Mike James. While Daniels has a lot of upsides, at this point he is just potential. He's about $20M over the next 3 years. That's a lot of money for someone who rides the bench.
The Mavs drafted Ager. Obviously Daniels' replacement. The Mavs are also pursuing Mike James with the MLE, and despite VanHorn saying he would resign for less in Dallas, he is going to get larger offers elsewhere.
So the Mavs traded off someone they had already replaced, to fill a void they were going to have, leaving them free to pursue the point guard they want in free agency.
Talk all you want about talent and athleticism, but at somepoint you have to think about business and team management.