It was a result of the Cold War as the US and Soviet Union were in a stalemate to spread their ideological influences across the globe. Since South Korea was a democratic capitalist country, and North Korea was a communist dictatorship, it was natural for the two countries to pick sides.