Attracting free agents by luring them to town with lucrative contracts is always an educated gamble for any general manager. It is therefore no surprise that sometimes these gambles work, and sometimes they do not.
Sometimes a player can be moved to the minors (Davis Drewiske, Dale Weise), traded to another team (Rene Bourque, Sergei Samsonov), and sometimes a mutual termination can be agreed to by both parties (Alexander Semin, Mark Streit). But when all those options do not work out, a buyout becomes necessary, especially in a world where the salary cap exists for teams to try to navigate.