The separation of political/moral from aesthetic value is at the core of fantasy as a genre.
JRRT's world is arch-reactionary, racist, and celebrates authoritarian government. The legend of King Arthur is much the same. REH's Conan is a celebration of a murderer and freebooter. In Star Wars we cheer when thousands of enemy crew die in massive explosions with no quarter seeming to be offered.
These are all fundamental elements of the fantasy genre: "LG" paladins who serve righteous kings; "heroes" whose principle mode of resolving conflicts is to deploy interpersonal violence; peoples divided along reified ethnics and racial lines (elves, dwarves, orcs, etc).
And even RPGs and settings that, in principle, might be able to express different outlooks - eg Traveller - tend not to. The default setting for Traveller is an Imperium; and the default conflict resolution framework in Traveller is one-on-one or small unit combat.
Meh.
There are certainly problematic elements of our favorite fantasy and sci-fi stories if you dig too deep (sometimes, just below the surface). And we certainly do compartmentalize to a degree when cheering the destruction of the Death Star or the return of the king to Gondor.
But the compartmentalization we're talking about here is on another level. Gygax proudly quoting Chivington's horrid "nits make lice" reasoning for slaughtering innocents as good tactics comes to mind. Barker's ability to write a fairly progressive seeming fantasy setting and also write Nazi fan-fic is perhaps another.
To me, a difference between these two ways of looking at history is that "mainstream" fantasy/sci-fi doesn't ignore the morality of autocratic rulership, but rather romanticizes it. Aragorn is esteemed because he's a righteous king and is returning Gondor to the light after a long period of decline. All those imperial deaths off-screen are easily forgotten, both because they are off-screen but also because they are the bad guys.
The old school wargamer compartmentalization we're talking about here is different. It celebrates horrific real world people, ideologies, and actions by separating,
compartmentalizing, the morality and horror from the military effectiveness. From a coldly analytical point-of-view, Chivington has a point. He was also a horribly racist individual and a purveyor of genocidal atrocities against Native American peoples.
Of course, this isn't meant to stereotype old school wargamers. I'm sure plenty of them, perhaps even most of them, didn't engage in this sort of troubling compartmentalization. And I'm also sure others, non-gamers, have taken a similarly compartmentalized view of history. But Gygax was definitely of the sort, as were several of his companions from the early Lake Geneva days. Perhaps Barker was similarly afflicted, I don't know.