The Nazi's stole many things, including its symbol, salute, etc.
You probably already know the Swastika was already in use prior to being appropriated by the Nazi party:
The
swastika (
卐 or
卍) is a symbol used in various
Eurasian religions and cultures, and it is also seen in some
African and
American ones. In the Western world, it is more widely recognized as a symbol of the German
Nazi Party who
appropriated it for their party insignia starting in the early 20th century. The appropriation continues with its use by
neo-Nazis around the world.
[1][2][3][4] The swastika was and continues to be used as a symbol of divinity and spirituality in
Indian religions, including
Hinduism,
Buddhism, and
Jainism.
[1][5][6][7][8] It generally takes the form of a
cross,
[A] the arms of which are of equal length and perpendicular to the adjacent arms, each bent midway at a right angle.
[10][11]
But the "Nazi" salute was supposedly first used by the Romans, adopted by Mussolini and further adopted by Hitler and Nazis because they were impressed by the original fascists in Italy in the 1920s:
The Nazi salute has less to do with Ancient Rome than you may have thought...
www.historyanswers.co.uk
Not mentioned in the article above, prior to the 1940s, it was somewhat common to hold a right hand salute up at the American Flag during the Pledge of Allegiance.
Because the Nazi party made these things infamous during their reign both now have a pretty negative connotation these days.
I think Musk was just did not know what else to do and got carried away in the moment but should have known better. He is not a very good at political speeches as he wants to explain things and nerd out, which is not what a political rally wants. The "my heart goes out to you" wave that looked like a right handed salute was odd.
I have spoken impromptu to crowds. Its easy if you can understand them, keep it simple and wind up the crowd properly.