In 1895, Japan defeated China in the First Sino-Japanese War of 1894–5, and their Japanese forces remained in Korea.
In 1938, Korean and its literature were banned from schools and conscription began.
One WWII later, Soviet forces arrive in Korea on August 10, 1945 and remain north of the 38th parallel. On September 9, 1945, the American forces show up and formally accept the surrender of Japanese forces south of the 38th parallel.
During deliberations on how to deal with conquered nations, the wishes of the Korean people to be free of foreign interference were not considered. The 38th parallel became the splitting line, because of convenience more than anything - it was already the demarcation between occupation zones in the Korean peninsula.
THEN OH SHIT COLD WAR DIDN'T SEE THAT ONE COMING DID WE