Japan was defeated because the U.S. dropped atomic bombs on Hiroshima and Nagasaki. Germany was defeated because it was an allied effort that produced two fronts. The western front(France) and the eastern front(Russia).
Japan was defeated long before the atomic bombs (incidentally, developed by a team of Allied scientists including several ex-Germans and at least one Italian) were dropped. Japan's manufacturing base had always been small, and by 1945 she was starved of resources (including fuel) as the Merchant Marine had been virtually wiped out. Many of her cities had been flattened by conventional bombing, too. In fact Hiroshima and Nagasaki had been largely left alone due to their relatively low strategic importance.
The Allies were able to defeat both Germany and Japan because by the end of the war their manufacturing capacity far outstripped the Axis'.
agricultural economies, ie the ussr, transitioned into full on industrialieconomies through 5 year plans, started with lenin, increasing output of raw materiels like steel and coal.
Shifting out of low-productivity agriculture into high productivity manufacturing, mining, and construction contributed to total factor productivity growth.