The logic is very easy: Certain groups objectives are not "Everyone lives well" or even "I live well", they are "I live well in comparison to those I see around me". They do not say it aloud and they are not very bright, but by their actions and what compromises they are willing and unwilling to accept you can eke out their true utility function. They thrive in chaos because they receive relative pleasure from seeing others fall, and even more from importing the miserable and keeping them miserable.
To be perfectly honest, everyone does this. Schadenfreude is an inherently human trait. The relative weight is different by person, though.