Seems like game theory + signalling can provide an explanation.
In game theoretical sense, if you precommit to harm, even at cost to yourself, those who defected on you, this can be a good strategy because it make others less likely to defect on you.
But to make it work, you have to signal in advance that your precommitment is credible. Harming someone, even at cost to yourself, even if they didn't harm you before, could be such signal.
There is probably some optimal amount of this senseless harm in a given situation, because it costs you, because it makes you enemies, and because if you'd do it all the time to everyone, then the other players would have no reason to not defect on you.
But if you harm people regardless of whether they've harmed you first, it doesn't disincentive people from harming you. It only does if you're more likely to harm people who have harmed you than people who haven't.
http://www.plosone.org/article/info:doi/10.1371/journal.pone.0041812
Here is a rather curious paper describing psychology researchers' attempts to investigate "spitefulness" - I think they define spitefulness roughly as "hurting others without any benefit to oneself". References the Stanford Prison Experiment. Concludes, more or less, that some people are spiteful, sometimes.
I have many reservations about the methodology used in this experiment (main one: not sure if the entire process really reflects any real-world motivations, and hence results might not mean much), but I thought it might be of interest to people on this site. Also, of the 30-odd references cited at the end of the paper some sound rather interesting and many are available online.