If Germany lets the Soviet Union post troops in German or German occupied territory...

(And if they don't, then the Soviets won't be that useful of an ally.)
Leaving aside the value of sneak attacks, whether joining the Axis was a time winning move, Soviet diplomats did ask to join the Axis. Had the Germans accepted their offer, then the Soviets would have been legally obligated to go to war with the USA if the USA declared war against any of the members of the Axis (per terms of the various treaties; it's complicated) and would have been entitled to the spoils of the war.
Now, I suppose Stalin could renege on the deal, but I also don't suppose the Soviets would join the Axis without some kind of consideration in either Eastern Europe, India, or Asia. (My memory is foggy, but I seem to recall discussions between German and Soviet diplomats suggesting the Soviets head into India.) Stalin may be a bit paranoid, but he's not an idiot. If the Soviet Union is getting something from the deal, and if time is on the side of the Soviet Union anyway, fighting alongside Germany isn't that bad of an idea.
After all, with no invasion of its home territory, what kind of military industry do you think would be in place by, say, 1945, with the Soviets building up the whole time? I wager it would be enough to make even Hitler reconsider the viability of Barbarossa.