After all, Stalin knew that war with Germany was inevitable. Attacking them while they were busy with France would have been an easy victory. Or at the very least, force Germany to fight on two fronts. Which is much better than Germany not fighting on two fronts.
Unless they expected France to hold out forever or even win?
Because the Soviet Union wasn't ready for war in 1940, and Stalin knew that. Despite some spurious claims that the USSR was planning to attack Germany at the time of Barbarossa, Stalin knew the Soviet Union wasn't prepared for fighting a war with Germany and was hoping to delay the fighting as long as possible.
Remember, Stalin had spent most of the late 1930s purging the officer corps of the Red Army, including some of its best theoreticians, like Mikhail Tukachevsky. The Soviets obviously had a huge army, but it was scattered throughout the Soviet Union, and there were still significant numbers of men stationed in the Far East due to Stalin's concern about a Japanese attack from Manchuria; there had been several border skirmishes between Soviet and Japanese forces in the preceding years, so this was a very real concern until Soviet espionage confirmed the Japanese didn't have offensive plans in the East in late 1941. The Soviets had massively built up their troop strength, but many of the soldiers and officers were inexperienced and not ready for actual combat.
In fact, not only was Stalin not planning an attack, he was basically in denial about the threat Germany posed. He received a number of warnings of an impending German invasion during the spring of 1941, both from Allied sources and his own spies, but ignored them. Some analysis attributes this response to a desire not to provoke a war with Germany by moving troops toward the front, at the expense of leaving themselves exposed to a preemptive attack. Stalin's generals even gave him a good idea of what the German offensive plans would be (focusing on an attack along the Minsk-Smolensk-Moscow axis, which ended up being the main thrust by Army Group Center during Barbarossa), but Stalin didn't believe them, arguing the Germans would try to attack through Ukraine instead.
So, long story short, the Soviets couldn't have attacked Germany while they were distracted in the west because they weren't in a position to militarily, and Stalin was intent on avoiding war as long as possible so he could try to get his forces ready to deal with the Germans. Stalin's assessment of German intentions was naïve, bordering on denial, which undermined the Soviet preparations and meant they were unready for the eventual invasion.
Source: David Glantz, Operation Barbarossa: Hitler's Invasion of Russia, 1941 (The History Press, 2012)