It was a scurrilous, unprincipled deal (much like Poland's deal with Germany to divide up Czechoslovakia a year earlier), but the Soviets didn't make it because they were friends with Germany. They had actually preferred to sign an alliance with France, in order to protect Czechoslovakia, but that had failed due to a lack of willingness from France and a refusal by Poland to allow Soviet troops to cross Poland to reach Czechoslovakia (for some reasons that were understandable, given that the USSR and Poland had recently fought a war, and also because Poland itself wanted a piece of Czechoslovakia).
https://en.m.wikipedia.org/wiki/Operation_Barbarossa
https://en.m.wikipedia.org/wiki/Case_Blue
https://en.m.wikipedia.org/wiki/Battle_of_Stalingrad
https://en.m.wikipedia.org/wiki/Battle_of_Kursk
https://en.m.wikipedia.org/wiki/Operation_Bagration
https://en.m.wikipedia.org/wiki/Siege_of_Leningrad
Just some friendly highlights. Feel free too look up all the others.