Well, this is another rails feature and a quite nice one which is not documented properly.
While using has_many :through associations, we can use before_remove, before_add, after_remove, after_add callbacks.
While using has_many :through associations, we can use before_remove, before_add, after_remove, after_add callbacks.