There's no question about when and where "The Secret Miracle" takes place. In fact, the very first line situates the story in a very specific historical context. It's the morning of March 15, 1939, and Hitler's army is invading Prague, the capital of then-Czechoslovakia. Big deal, right? Well, even more so because our protagonist is a Jewish intellectual, and in the months leading up to World War II, the German army was already known for violent anti-Semitism and the persecution of Jews. So yeah, things aren't looking good for our main man.
The setting frames a lot of the plot points in the story. Think about it: being Jewish and opposing the Anschluss (the Nazi annexation of Austria) is enough to get Jaromir Hladik picked up by the authorities. And then, because the Nazi officials think Jaromir might be kind of important within Jewish intellectual circles, they decide to make an example of him and sentence him to death. And there we have the set-up for our whole story.
But, as settings do, this one does more than just motivate the plot. It also allows Borges to reflect on the uncoolness of anti-Semitism, a sentiment that was pretty popular in Argentina in the 1940s when he was writing. The decision to set the story in Prague supports this anti-anti-Semitic message, since the city was once the home of Franz Kafka, a writer Borges admired a lot – and who happened to be Jewish.
Though Borges himself was not Jewish, he frequently wrote speeches and essays in opposition to this wave of anti-Semitism in his country. Some of Borges' critics claimed that he was hiding his Jewish ancestry, but Borges one-upped them: he responded with an essay entitled, "I, a Jew," in which he thanks them for calling him Jewish, and says that he wishes their accusation were true:
Who has not, at one point or another, played with thoughts of his ancestors, with the prehistory of his flesh and blood? I have done so many times, and many times it has not displeased me to think of myself as Jewish […] The magazine Crisol [Crucible], in its issue of January 30, has decided to gratify this retrospective hope; it speaks of my "Jewish ancestry, maliciously hidden" (the participle and the adverb amaze and delight me). (Source)
Man, this guy is smooth. Leave it to Borges to take what was meant to be an insult and turn it into a compliment. Borges' rebuttal is really classy: he doesn't need to tear down his enemies in order to make his point.
Bottom line: it's important to remember that an author's setting – the world in which he lives – can have a huge influence on the setting of his story. "The Secret Miracle" is a case in point.