Welcome to the wonderful world of Malazan.
You will find out the hard way, that a lot of what's going on in the series - just like real life - doesn't have a clear explanation, as every character has his or her own agendas and may have a change of heart. Or, that a lot of things get their answers in the later books. But, this is the way it supposed to be. Steven Erikson wants his readers to think and guess. He won't give anything on the plate.
Now, in regards to your actual question, let's examine the facts:
Obviously, SPOILERS regarding GotM follow:
- Tool has made a pact with Empress Laseen to free Raest
- The original goal was to free Raest only to weaken Anomander Rake (if not kill him) and then to kill him (Raest). You wouldn't want an ancient Jaghut Tyrant to roam Genabackis.
- Tool is clanless. This means that he answers only to himself. Think of him as human in terms of ethics. He may be a T'lan Imass, but he's not an automaton. He has feelings and acts through critical thinking.
- Tool had expressed his feelings towards freeing the Jaghut. He wasn't exactly ok with it.
- Almost nothing went as planned for every side of the participants.
Baring all the above in mind, my feeling is that Tool helped in the destruction of Raest to make amends for freeing him, as well as because it was the most logical thing to do based on the actual events (in comparison to what Lorn was expecting to happen).
p.s. Deadhouse Gates will provide you tons of information on the Houses of the Azath, so the ending of GotM regarding Raest will make a lot more sense, as well as a lot of things happening in that book. But, as I said, this is exactly the way it supposed to be. Erikson writes for the patient readers.