It is true both countries were already industrious, but it was far from a given they could go back to their former self. They were both utterly destroyed, and things could have gone really badly, especially in Japan.
I can't find the reference right but I remember reading average adult calorie intake to drop to ~1200 kcals in 1947/1948 in "embracing defeat" by John Dower. That period has a huge influence on Japan to this day, including architecture of Tokyo through black market.
Both Japan and Germany had strong military govt culture, and became reliably democratic at the end of the allies occupation.