The Castro example doesn't really fit here. That would be an assassination of a foreign national, not a domestic assassination like in Rabin's or Abe's.
*In some countries.
In others, the primary purpose is rehabilitation so people can eventually re-join society as "better people".