In the early days of the NOI there was a level of cooperation between the NOI and KKK because they shared the separatist view, under Elijah Muhammad's orders Malcolm met with some leaders of the KKK, although it is Clear that he did not like these exchanges(Malcolm wrote in his journal about it). The relationship ended shortly when the NOI became more popular.
They attended because they shared some common beliefs with Malcolm X, primarily that people having skin with little eumelanin pigmentation and people having skin rich in eumelanin pigments should not integrate. Actually pigmentation was not the point. The point was "every time our people and your people are together, our people face slavery, murder, brutalization, massive injustice, economic and political inequality, and a general concerted effort to make sure that we, as a collective group of people, can never succeed in your society. So... how about we just go our separate ways. We'll get away from you, you stay away from us, conflict resolved." People who are as staunchly racist as the folks in this photo aren't racist purely because of skin color. They dislike people of another race because of their skin color and their culture. So more like people who have differing eumelanin pigmentation levels in their skin, oh and also have different dialects, cultures, histories, religions should not integrate, especially when the folks with less eumelanin have been routinely fucked over by the folks with more eumelanin.
It's amazing how people could get away with wearing Nazi symbols a mere 15 years from World War 2. It took a while for people to really understand and grasp the full extent of what the Nazis had done. A lot of the publicity of the Holocaust didn't become widespread knowledge until after the Eichmann trial, before then, Nazi persecution of Jews was often considered a part of their greater oppression of Europe.
After the Eichmann trial, there was a huge rise in publicity of Holocaust stories. Survivors who had not come forward before (due to being spurned for not fighting, or simply too traumatic), saw survivors at the Eichmann trial and were encouraged to share their experiences. Holocaust remembrance took the west by storm, eventually including a surge of films from Hollywood in the early 70s and the opening of a series of museums. So really it was the post-Eichmann generation who really understood the depth of Nazi cruelty, explaining why people could get away wearing swastikas in the early 60s. Also it was not until The 60s that a lot of scholarly research was being done and it was not until the 90s that all of the Germans archives were actually open to study.