But after a very sharp action which the IJArmy lost very badly, commanded in part on the other side by an obscure Soviet general named Zhukov (https://en.wikipedia.org/wiki/Georgy_Zhukov who unlike his two counterparts managed to avoid the 1941 purge), they signed a neutrality pact, reaffirmed after Operation Barbarossa, that they scrupulously observed. Being faced with another even more bloodily minded opponent certainly didn't hurt the surrender decision.