The Soviet Union and Nazi Germany agreed to split Poland as part of an agreement to recognize "spheres of influence" in the nation lying between them. So in 1939, they both invaded Poland, Germany from the west and the Soviet Union from the east. See Soviet invasion of Poland:
Naturally, once Hitler turned eastward, the Soviet Union became an "ally" in the fight against the Nazis, leading to its need for aid in the fight. That aid was extensive as set out in World War II Allies: U.S. Lend-Lease to the Soviet Union, 1941-1945
Source US Holocaust Memorial Museum*
The Soviet (as well as German) invasion of Poland was indirectly indicated in the "secret protocol" of the Molotov–Ribbentrop Pact signed on 23 August 1939, which divided Poland into "spheres of influence" of the two powers. German and Soviet cooperation in the invasion of Poland has been described as co-belligerence.
The Red Army, which vastly outnumbered the Polish defenders, achieved its targets, encountering only limited resistance. Some 320,000 Poles were made prisoners of war. The campaign of mass persecution in the newly acquired areas began immediately. In November 1939 the Soviet government annexed the entire Polish territory under its control. Some 13.5 million Polish citizens who fell under the military occupation were made Soviet subjects following show elections conducted by the NKVD secret police in an atmosphere of terror, the results of which were used to legitimise the use of force. A Soviet campaign of political murders and other forms of repression, targeting Polish figures of authority such as military officers, police and priests, began with a wave of arrests and summary executions.[Note 5] The Soviet NKVD sent hundreds of thousands of people from eastern Poland to Siberia and other remote parts of the Soviet Union in four major waves of deportation between 1939 and 1941.[Note 6] Soviet forces occupied eastern Poland until the summer of 1941, when Germany terminated its earlier pact with the Soviet Union and invaded the Soviet Union under the code name Operation Barbarossa.
Even before the United States entered World War II in December 1941, America sent arms and equipment to the Soviet Union to help it defeat the Nazi invasion. Totaling $11.3 billion, or $180 billion in today’s currency, the Lend-Lease Act of the United States supplied needed goods to the Soviet Union from 1941 to 1945 in support of what Stalin described to Roosevelt as the “enormous and difficult fight against the common enemy — bloodthirsty Hitlerism.”
"Bloodthirsty Communism" could have been trotted out, too, with good reason. The Soviet Union's "unclean hands" seem to linger on today in the Putin regime.