China's Civil War ended in 1949 when the Chinese Communist Party (CCP) defeated the Chinese Nationalist Party (KMT) and drove them into exile. Call them Diaspora, a rump government or a government in exile, the KMT came and set up a one-party state on Taiwan (then vacated by Japan); there they licked their wounds vowing that they would return and take China. If they could not hold China when they were in China, then of course there was no way that the KMT could come back and retake China. Fortunately the Korean War broke out and the presence of the US Seventh Fleet in the Taiwan Strait saved the KMT from this embarrassing dilemma.
The year 1952 came and went and in the San Francisco Peace Treaty of that year, Japan formally gave up Taiwan, but the treaty left unsaid to whom Taiwan was to be given, i.e. to the People's Republic of China (PRC), the Republic of China (ROC) or even the Taiwanese. By this time, the KMT's one party state, the ROC, was a founding member of the United Nations (UN) and even sat on its Security Council. It supposedly represented China. However, in 1971, that also changed; the ROC was replaced by the PRC as representing China. Later still in 1979, the United States (US), one of the ROC's staunchest allies switched its embassy to Beijing and joined the chorus stating that the PRC represents China.