Hurting the enemy is intentional and thus has an implicit "gain" built into it, even if it's just psychological. The physical losses can be deemed acceptable because of it, if the satisfaction derived from hurting the enemy balances them out. The OP is describing stupidity where the result is a true loss or zero gain, because the intent wasn't to hurt in the first place.
I suspect there's a strong correlation between people who are motivated by harming others, especially organised hatred of specific groups, and people who self-harm through poor modelling of consequences.
Harming others correlates with personality disorders. Personality disorders - especially Cluster B - correlate with poor impulse control, an emotional rather than a rational orientation, addictions, unreliability and dishonesty, and general inconsistency.
Disordered people with high IQ and EQ tend to get away with disordered relationships for longer. But it's rare to live one of these lives with zero consequences. So these types are at least as likely to go through catastrophic collapse as to get away with their chaos and dysfunction.