In ancient times, Hakkas lived in what outsiders call the Central Plains, and most of them were officials in the DPRK. Therefore, Hakka used to be the official language of the imperial court and the people. However, due to the subsequent war and the change of dynasties, Hakkas began to escape from the war and began to migrate. Most of them moved to the mountains and had little contact with the outside world for thousands of years. Therefore, Hakka dialect is the best preserved ancient Chinese.
Although Japan sent envoys to China on a large scale during the Sui and Tang Dynasties, many people thought that Chinese had spread to Japan. In fact, earlier, during the Qin Dynasty, there was communication between China and Japan. The first and only Japanese female emperor ascended the throne, which was also related to the imperial court of China at that time. Later, among the cultural relics unearthed in Japan, there was the official seal of the queen to the mainland countries, which happened to be the Han court at that time. Hakka in the official language has a great influence on Japanese.
As for Minnan language, there were many routes for ancient Chinese to spread to Japan, which were all famous diplomatic channels at that time. The spread of Minnan dialect is spread along the coastal areas of Guangdong and Fujian to Kyushu and then to the center of Japan.