Oxford dictionary says the following about the etymology of rocket:
Early 17th century from French roquette, from Italian rocchetto, diminutive of rocca ‘distaff (for spinning)’, with reference to its cylindrical shape.
Wiktionary explains the etymology of the German counterpart, Rakete, in a very similar way:
From the Italian rocchetta, diminutive of rocca (“distaff”). Confer the Icelandic raketta (“a skyrocket, a rocket”).
Duden's explanation of the etymology of Rakete isn't much different:
älter: Rackette, Rogete < italienisch rocchetta, eigentlich Verkleinerungsform von: rocca = Spinnrocken, nach der einem Spinnrocken ähnlichen zylindrischen Form
We see here an old German version with o, namely Rogete, so the Germans apparently changed o to a themselves rather than borrowed the word from a language in which the word was already spelled with a.
I am curious as to why the Germans changed o to a and were thus less respectful to the original than the English speakers were.
I noticed that the vowel under consideration is stressed in rocket, but unstressed in Rakete, which led me to think that it might have been natural to Germans to pronounce the unstressed ro as ra and then change the spelling accordingly, but later I found some German words of foreign origin that start with an unstressed ro, e.g., Rogate and Rokambol. Rogate is very close to Rogete in terms of spelling and prononciation, but remained with o, whilst Rogete didn't.
So why do Germans spell and pronounce Rakete with a?