In 1952, three years after Chiang Kai-Shek’s government fled from Mao’s forces to Taiwan, the San Francisco Peace Treaty between the Allies and Japan entered into force.
The Treaty recognized the United States as "the principal occupying Power" on the island. While Beijing points out that it is not a signatory to the Treaty, its unilateral position does not negate the legal fact that, from the point of view of the 46 states party to the Treaty, the United States became the legal custodian of Taiwan when Japan’s title was dissolved.
. . . . . . . .
Japan’s title to the island was extinguished, and the treaty left Taiwan legally occupied by the United States, the secondary and subordinate occupying power implicitly being the Republic of China government in exile, which was sustained through massive U.S. government military and financial aid.