Except in this case he was on his 2nd (maybe 3rd) contract. He had turned into a rotation player, and could put up good numbers on bad teams. Not a player to win a championship with, but there have been bigger busts. And obviously Portland didn't think he was worth the money.
I agree - Portland made their bed now have to sleep in it. I don't know if any team would sign Miles just to F Portland's salary cap, but I can't blame them if they did.