Japan were major imperialists prior to WW2. They had all of Korea, Taiwan, Manchuria and lots of islands that I don't keep track of. They treated the Koreans and Manchurians more or less like slaves. Their know-how did not disappear just because they were defeated in the war.Most of the major Western power riches which were gained that way were destroyed during the WWI and WWII. Japan have not done all that imperialist/colonialist/slavery stuff, but despite that it's one of the major innovative nations in the world.
After the war they did absolutely everything that was asked of them politically and they work fanatically hard. Hence they were able to create an export industry that did not start out as an inventor, but moved gradually towards that.