For more context:
Before the pact w Nazi Germany, Stalin asked Churchill how many divisions he could put up for the defense of Poland. Stalin offered 15 and Churchill said he could only put up 2. A division is about 15k troops iirc. So Stalin was rightfully disappointed. Britain was very unprepared. Soviet Union also wasn’t prepared yet for full war with Germany.
It should also be added that Stalin also hated Jews, and was absolutely a murderous psychopath
I think it's more accurate is to say that they were on the good side (allies), but they had their own imperialistic interests. Well, and also committed a lot of war crimes.
So yeah, they were the bad guys, just on the other side.
They literally signed a public pact with the Nazis and a secret pact to split Europe up, before the Nazis invaded them. They had a common enemy in the "West" and plenty of European lands (Estonia, Latvia, Romania, Finland, Lithuania) to split in between.
Stalin got greedy though and decided to invade a part of the then Romania outside the sphere of influence that had been agreed in the secret pact. It's not clear if the Nazis would have launched Barbarossa anyway, but Stalin claiming lands beyond their agreement in their eastern flank didn't help.
They were hardly "good guys", invading sovereign lands and imposing terror, they just had to fight against the Nazis when it turned out the Nazis invaded them before they finished fighting the West.
If the Hitler had possessed enough wisdom/restraint to postpone or cancel Barbarossa despite his ideological hatred of the Soviets then the odds of a D-Day type landing being possible would have been way, way smaller and short of a nuclear bombardment of Europe the Nazis may never have been defeated. Even if they had been, they might have been able to negotiate a conditional surrender. It's one of the weirdest, darkest historical hypotheticals and it was avoided only because Hitler wasn't just a little wiser.