Hamilton didn't want to stay in Boston, that was actually well documented.
Signing Beleskey isn't a bad thing, he can always deal him to another team later on because of his cap hit. The years on it aren't a big deal, it's easier to find trading partners with longer contracts than it is with high salary contracts.