Emotions, embedded in memories, also play a part in the inner cognitive process of decision making, when confronted with a similar situation that one has previously dealt with.
An interesting example of this, which could be tied into empathy for the sake of drawing a distinction between "responses" for a socio and non-socio would be the following: You as a younger person were beaten by a group of unprovoked individuals. Then years later, you were witness to a young person being assaulted by a group of individuals just as you were. This could trigger the memory from your earlier personal experience, and with it, the embedded emotions that came with that experience. Empathy plays a part in being able to directly understand the experience from the point of view of the 'victim' and having a desire to aid them to help mitigate the potential physical and emotional harm that would come to the person.
However, there may be even "more to it" then that since emotions embedded in memories have a powerful influence on our actions. Many arguments could be made about the "underlying psychological reasons" a person would act to help this person, however it would be easiest on a purely rational level to "walk away" and leave them to suffer the same fate you had suffered. That is why emotions are considered a weakness to many, as we often associate "rational" as being intelligent, thus, why put yourself in harms way when you could avoid it, just to help someone you don't know and that might not personally benefit you in a tangible way.
Herein lies the crux. For a person capable of feeling empathy, there can be a feeling of satisfaction and fulfillment, when a physical action is taken that challenges an emotionally embedded memory.
Are you suggesting that you simply like hurting people and seeing the opportunity to do so in this scenario, you would capitalize on the already occuring violent behavior of others? If that is the case, why take on the role of helping the victim?
And since you suggest you'd leave the victim if you came along after the violence, what if you were successful at causing the gang to disperse and victim was left there hurt. Would you still offer no assistance?
On a side note, do you participate in Mixed Martial Arts or Boxing or any sanctioned sports that involve fighting or do you merely enjoy brawling spontaneously?
In regards to helping those in need when no immediate reward is visible, it can sometimes be the case in my experience that doing acts that involve helping others does go rewarded although in the immediate moment it is unclear that a reward will commence at some point later. As I am sure you are aware, doing favors for humans can be a manipulative tactic to evoke a desire for reciprocation on the part of the one receiving the favor.