Both Germany and Japan were totally defeated and surrendered unconditionally.
Germany was partitioned so the west was concerned about the Soviet threat too. Japan was controlled by a virtual god, the Emperor, who directed his followers to stop fighting and cooperate, which they did.

Had either continued to fight in any significant way, the rebuilding would’ve been at least delayed.