Why did North Korea and South Korea separate?

Like in Vietnam, North and South had different opinion about government. North Korea is currently a communist country and South Korea is currently a democracy.