I'm not sure I'd use the term "really smart", but I agree with the concept. Just because the Bucks were great last year, doesn't mean that pick must necessarily be worse than 24th (which was the position of this year's pick used to get it).
Things to keep in mind:
1) As the OP mentioned, injuries (and other bad stuff) happen. Keep in mind the Celtics were favorites to win the East this past year, and ended up with the 22nd pick even though they were healthy. The Bucks could lose some combination of Middleton, Brogdon, and Lopez this offseason. Or, something could happen that we're not thinking of right now.
2) There's more room to improve from #24 than there is to worsen. The best this pick can be, if Milwaukee runs into major trouble, is #8. The worst it can be would be #32.
3) This was about cap space and preserving assets. Phoenix recognized the Celtics' situation -- wanting to maintain a good chunk of cap space and future assets, keeping its options open -- and took advantage. Both sides saw value.
4) It's possible the Celtics value next year's draft more than they did this year's. They might not have seen anyone they really valued in that range this year especially after taking Grant Williams and still having the 33rd pick coming up. Perhaps they figured even a pick in the late 20s or early 30s next year would be equal value.
With all this said, I'm still a little curious as to why they moved away from Baynes this early. Why not hold on and try to deal him later, when you actually came to an agreement with a free agent? But that's a different topic.