Yes and no. At the time people suspected that Japan was close to surrendering but there was no way to actually know that. The USSR could have been signing up for another 6 months of war. There was no way to know at the time.
They actually didn't get much land out of the deal. Some islands that are still contested were really the only prize. The US artfully steered the USSR away from taking more territory. They wanted to invade and capture the northern island of Hokkaido but the US basically told them no.
They did have territorial ambitions in the region but they were also putting up a face of supporting their US allies finish the fight.