For starters, we don't know what the terms of his agreement were (i.e. there could have been an option for either party to terminate on X months notice, or more likely that the club could terminate before X each year and only be liable for 12 months salary.
Why did Aaron Woods lose cash on the deal to go to the Sharks? He could have stayed put.
Hook may have got to the point where he didn't want to put up those around him (he might value his health) and if the club didn't want to pay out 2 years he might have said, give me X and I can go and work for someone else.