He took revenge for the treatment meted out to his friends by people under British protection.
America took revenge on the Afghans for not handing over Osama who was under Taliban protection.
The motive was the same.