Season 1 episode 8 (IMDB), episode 9 (Paramount), or episode 11 (Memory Alpha). Anyway, we get a complete copy of Earth, the failed longevity experiment, bonk bonk, and Kirk wrenching a kid off a desktop. Beyond that, no explanation surrounding AN EXACT COPY OF EARTH! Zero, zip, zilch, nada.
Side query: What’s considered the “official” episode breakdown?
Anyway, the real question you have to ask is why the city Miri was in was an exact copy of Mayberry.
In universe answer, coincidence. Real world budget.