When I was a kid these episodes used to annoy me because I knew it didn't really make much sense. Now I don't care because a lot of them are so much fun, especially A Piece of the Action...
Well technically A Piece of the Action and Patterns of Force are cultural contamination.
The Omega Glory is more problematic as it is a world where the United States and Communists evolved independently.
Miri's world COULD have a reasonable explanation if one tried hard enough. For instance, we know know that the interphase in Tholian space leads both back in time and to parallel universes. Its possible that the interphase is naturally occuring, in which case, one may have been large enough to snatch a parallel solar system into the the main universe. Magna Roma is also nearly identical to Earth, so the same might be true in that case as well.
However without this explanation or even speculation it just looks kind of silly.