There is pretty clear evidence that at some time people from the Austronesian family of languages comprised a large part of Japan's population. Austronesian type speakers are found right across the Pacific to Australia and beyond. It seems certain that many of the same peoples who entered Korea also came to Japan. However the underlying grammatical patterns of Japanese dialects are closely related to the grammar of Korean dialects, even though the languages sound quite different. Such partial relationships are the norm in language families.
Language change The word repertoire of every language alters constantly.
Over the last two thousand years, both Japanese and Korean have absorbed and adapted thousands of Chinese words in their own ways, and according to their own sound rules. The driving motivation for this was probably much the same as the worldwide tendency to borrow English words today. Because of its remoteness however, Japan was never as siniticized as Korea. Much earlier, it seems likely that the invading groups which brought old Altaic-Japanese grammar eventually intermarried with local Austronesian people already settled in the Japanese islands, and absorbed a large proportion of local vocabulary. I am unaware of any similar proto-Austronesian influence in Korea.