Not all members of the Soviet Union loved Joseph Stalin or communism. Note that with the end of communism there, the Soviet Empire broke up into many nation states.
When the Nazis invaded the Soviet Union, they were greeted as liberators by many of the smaller nations, especially the Baltic states (Estonia, Latvia, and Lithuania) and the Ukraine. Many of those peoples willingly joined the Nazis and fought against Stalin, so they became allies of the Germans.
Remember the famous saying: "The enemy of my enemy is my friend." That is why wars are so messy, so family members actually wind up fighting other family members as happend in the American Civil War. I have traced my family's history and discovered that some fought for the North, some fought for the South, and some stayed out of it altogether.