One of the things I enjoy most about writing science fiction and fantasy is world-building. Truth be told, I often get so caught up in that that I forget to write my story. Back when I was a regular contributor to TSR's Dragon Magazine, one of the things I specialized in was coming up with plausible rationales for things to be found in the rulebooks, or "Point of View" articles for new player-character races.
Quite a few works are very successful with bad or inconsistent worldbuilding, of course. The Harry Potter books, the Hunger Games trilogy, Atwood's The Handmaid's Tale...all of these have holes in the worlds they depict that I could fly a 747 through easily. Even Tolkien's magisterial Lord of the Rings has flaws...what did all those apparent thousands of orcs in Moria eat? He did mention huge slave-worked fields down around Lake Nurnen in Mordor, but I don't think that Mordor was busily exporting food to Moria or the orcs of the Misty Mountains...and mountains are notoriously poor places to find food.
I'm also fond of "mirror universe" scenarios. I was reading the "Mirror Universe Trilogy" in the Star Trek universe, and I got to wondering how the Empire could arise, and how and why it could function. Poul Anderson warned would-be worldbuilders that the societies they created had to have people that loved them, or at worst, considered them preferable to the available alternatives: "If nobody loves it, it won't last an hour."
Looking at the Terran Empire from this point-of-view, a lot of it doesn't make much sense. Just for starters, a Starfleet where promotion comes via assassination would soon collapse; you'd get your best or at least reasonably competent officers assassinated by any disgruntled underling with a talent for treachery. Assassinating superior officers would have to have rules governing it, whether openly stated or just generally known. Like "Assassinating a superior who has proven himself incompetent, disloyal or unable to do his job is acceptable. Otherwise, it's murder and mutiny."
And in "Mirror, Mirror," Mirror-Kirk reacts to the Halkans' refusal to allow the Empire to mine their dilithium by threatening bombardment of their planet. Why? They're pacifists! Just bring your miners in and go for it! What're they going to do? Cry? Make faces at you? Write nasty letters to the editors of Utne Times and Berkeley Barb? Just take the damn dilithium! And if you need examples of what horrible things can happen to those who resist the Empire, if you don't have any good ones on hand, does the Empire not have CGI and enough special-effects wizards to produce videos that would convince anybody?
There are several alternate timelines that lead to the Empire. In her novel Dark Mirror, Diane Duane postulated that the Mirrorverse had always been inclined toward evil, as far back as when the Iliad was written, while the TV show said that it started when Zephrem Cochrane and some other folks killed the first Vulcans to stumble across Earth, and stole their warp drive.
If I had been tasked with coming up with the background I'd have done it differently. Like this:
Many of you have seen the fan film Prelude to Axanar (which I take as an example of why the franchise would be better off in the hands of the fans than the clowns at Paramount). I was wondering what would have happened if the Klingons had attacked earlier? If they'd come a century or so earlier, they could have taken all four of the Federation's main homeworlds: Terra, Vulcan, Andoria, and Tellar.
So, postulate a generation growing up on these four worlds under the gentle ministrations of the Klingons. Oppression does not teach gentleness and compassion; many oppressed people have turned out to have learned how to oppress, and to eagerly apply the lessons when the opportunity arrives, whether against their former tormentors or other people. There would also be a lot of Klingon cultural influence, which would explain things like the agonizers, agony booths, and probably the uniforms. Even after the Klingons were gone, the Terrans, Vulcans, Tellarites and Andorians would be changed from what they were, and highly unlikely to take being thwarted or told "No!" very well.
As for the ISS Enterprise, I could make a case that Mirror-Kirk is, himself, very dysfunctional, and has attracted a crew that is just as dysfunctional as he is. The Enterprise is not a plum assignment, but the Imperial Starfleet's bad example; being posted there would be seen as a punishment. Mirror-Kirk has avoided his superiors' lethal displeasure mainly by being (as Mirror-Spock points out to our own Kirk) very profitable. And it's useful sometimes to have a mad dog ready to unleash on those who need it.
The Empire itself has little interest on how its constituent worlds govern themselves. As long as taxes and tributes are paid, and proper deference to Imperial authority is shown, they are more-or-less let alone. Rebellion or defiance will bring ferocious retribution.