Japan pre-45 was a world power, and had industrialized by the early 1900s. WW2 was a mere setback.
Korea is more of a “miracle” than Japan was, but they also did well to industrialize ASAP. They also didn’t face the brunt of European colonialism.
But they faced the brunt of Chinese & Japanese colonialism, and a full-blown civil war after which their GDP per capita was in the same ballpark as Kenya's.
China made the right choice to dump a ton of resources into different industries without the expectation of immediate RoI or any RoI at all. Anyone or anything that got in the way of their goals were dealt with.
Imperialism (as a system of extracting wealth from poor countries) continues to exist, but China has a working countermeasure. You can see similar with Vietnam.
Similarly in WWI, it was invaded by Australia and only gained independence in 1975.
Before that, it was split between Germany, the British and Dutch.
Before that, its population was impressed and blackbirded by European traders.
Like cargo cults literally developed there lol