The underlying reason is that the Soviet Union was trying to reach an agreement with the Western allies during the Annexation of Czechoslovakia to stop Germany. During this time the Western Allies were still entrenched in their appeasement politic. This pushed the Soviets away and subsequently they started to focus more on their own interests without taking Western Allies into account.
This "own interest" would be taking back regions that 30 years before were part of the Russian Empire. Finland, the Baltics and the Russian part of partitioned Poland.
THe Molotov-Rippentrop pact is also partly because of this reason made. It was the Soviet Unions own way to deal with Germany, at least for some time.
edit: They only found "back" to each other when they were forced to by Germany invading the Soviet Union and dragging it into the war.