The same way as a "Mirror Universe," in which good is bad, bad is good, and the ship flies right to left instead of left to right.
I'm not saying any of it made sense -- in any of these shows. I'm just saying that they're all FUN. It wasn't until TNG that we all got so worried in knowing every last scientific reason on-screen. How much techno-babble do you want in a half-hour cartoon?
Counter-Clock could have been saved with "It makes no sense, Captain. I suspect it's a parallel universe. We may never fully understand its details, especially since we must leave as soon as possible."
Which is what I judged Spock to have said, when there wasn't a camera filming his animated image.