I always thought, that the molotov-ribbentrop pact was agreed by Stalin because he knew that the Soviet Army was ill-equipped and undermanned. He had no interest in dealing with the Nazi's personally, but was using the pact as a means to give him some breathing space for his own military build up. Stalin probably could've cared less if a chunk of Poland was added into his realm or not based on the treaty, but as it was, why not add a little bit to the realm? In any event, had Germany not attacked the Soviet Union, then the Soviets would've been the first to attack Germany. They were just waiting for their own build up, but War came a little too early to react capably with ill experienced officers.

Unfortunately, Poland has a history of being the best place to invade for a logistical spring board into other territories.