Answer: First of all, I won't take credit for the translation, and indeed I might have translated the sentence differently. But por is nearly always used in translating these famous inaugural words.
This is one of those rare cases where you can translate "for" as either para or por and be grammatically correct. But being grammatically correct doesn't mean that the understood meaning would be correct. In fact, "hacer para su país" might be understood to mean "to make for your country." There are good reasons why por is the preferred translation in this case.
Let's look at two ways we could look at a simplified variation of this sentence. You could translate "Do it for your country" in at least two ways:
- Hazlo para tu país.
- Hazlo por tu país.
- Do it to give it to your country.
- Do it because of your country.
It is for similar reasons that you'll hear statements such as "Hazlo por mí" (Do it for me) and "Lo hago por ti" (I do it for you) much more often than "Hazlo para mí" (Do/make it for me) and "Lo hago para ti" (I do/make it for you). All these sentences are grammatically correct, and you'll hear native speakers use all of them. But por suggests a motivation (in these sentences, presumably that's love or concern) that is absent from the sentences using para.
One rule of thumb is that if you're translating the English "for" to Spanish, and you can substitute "because of," in most cases you should use por and very seldom para. Here are some examples that follow the pattern of the sentence in Kennedy's speech:
- Yo lloraba mucho por mi madre. I cried a lot for (because of) my mother.
- Él ganó por mí. He won for (because of) me.
- Lo que tenemos es una batalla por la nación. What we have is a battle for (because of) the nation.
- Lucharon por la Madre Patria. They fought for (because of) the Motherland.