I'm certainly not alone in trying to make sense of it all without completely destroying my faith in averaged-out humanity.

A hypothesis: The "spite" is secondary to their insecurity and fear of not belonging to a "safe" group, in a world they assume has vicious and unavoidable hierarchies or cruelty. Having the out-group hurt (or even just baffled) occurs in service of that.

Professing and supporting stupid beliefs is "loyalty", an expensive (and therefore prominent) signal of membership. Like tattooing Dear Leader's name on one's forehead. It's less an opinion one holds and more a song they sing to fit in with the flock.

I find that focus on insecurity and loneliness and fear—versus the reward of belonging—a bit more comprehensible than spite as its own reward.

Preach.

AKA shibboleths

Further, the rhetoric creates a permission structure which allows (enables?) people to be their worst selves.