https://en.wikipedia.org/wiki/Division_of_Korea
On August 10, 1945 two young officers Dean Rusk and Charles Bonesteel were assigned to define an American occupation zone. Working on extremely short notice and completely unprepared, they used a National Geographic map to decide on the 38th parallel. They chose it because it divided the country approximately in half but would leave the capital Seoul under American control. No experts on Korea were consulted. The two men were unaware that forty years before, Japan and Russia had discussed sharing Korea along the same parallel. Rusk later said that had he known, he “almost surely” would have chosen a different line.[8] Regardless, the decision was hastily written into General Order No. 1 for the administration of postwar Japan.
Unfortunately Korea was just an afterthought