Stalin knew the end of the fight against Germany would free up his vast armed forces to invade Japanese-held territory in Asia, such as resource-rich Manchuria. The USSR declared war after the Hiroshima bombing but before the Nagasaki bombing. It's intention was clearly to grab territory before Japan surrendered