Max, Germany and the Soviet Union were opposing ideologies at the time. Stalin wanted a strong alliance with the British and the French which would guarantee those 2 countries coming to their aid if the Soviet Union was attacked by Hitler, who had his eyes set on the eastern lands’ for a long time. The British and the French could not provide that commitment, because they did not want to upset Hitler.
Stalin had to look after the interest of his country.. He was not a nice person by any stretch, but he did what he thought was necessary to protect his country, because the same as Poland, the Soviet Union was left to face Hitler alone, because of the British and the French non - commitment to assist.