Why did the Japanese and South Koreans want to become allies and make sure that they stay connected with the US?

Why did the Japanese and South Koreans want to become allies and make sure that they stay connected with the US class=