Xunzi pretty much summed it up. I will add in a bit more detail on why things were happening as they were after WWII.
Essentially, US supported the original treaty because at time, the representative Chinese government in power is KMT (I used the term representative because KMT government at the time is more of a loose coalition of KMT and local warlords), which is aligned with US. However, after the civil war, CCP managed to unite mainland China and aligned with USSR.
The next major event is the Korean war, where NK attacked SK in order to unify Korean Peninsula which essentially escalated into a contest between China/USSR and US/Europe. This setup the main cold war fronts in East Asia theater.
After Korean war, US begin to fortify its position in East Asia. One of the main steps for this time is fortifying Japan's position. While US was not crazy enough to let Japan re-arm, it did use other methods such as economic aid (which is one of the reason Japan was able to develop quickly after WWII) and give Japan more leeway to WWII treaty. This includes give administrative control of Diaoyu islands to Japan.
One final thing is why US did not give the control to Taiwan (which is a US ally) instead. This can be a little bit complicated. Basically, US originally wanted Taiwan to be independent from China. If it succeeds, it will severely damage the strategic position of China by placing a foreign nation at China's door step and at 50s and 60s, it will be very difficult for PRC to contest this.
However, US run into an obstacle. Chiang Kai-shek, for all his faults, is unwilling to let China to become divided, thus US has to try to go around him to support other factions in Taiwan, but this was stopped, surprisingly, by a combined effort from Chiang and Mao. Basically, while Mao and Chiang are life-long adversaries, they are in full agreement that China must stay unified. Hence why Mao started shelling Kinmen (or
Quemoy) islands. This is also known as second Taiwan strait crisis.
Now this event, when viewed by itself can be a bit strange----the initial shelling can be explained as PRC discouraging ROC to setup troops and artillery on Kinmen island, but it doesn't explain why the sporadic, but continuous shelling to the next two decades to come. However, when you view the secondary effect, its purpose become apparent-----Chiang is able to declare martial law in Taiwan for the next two decades and systemically eliminated every faction that supported Taiwan independence. In fact, the shelling stopped at the exact same time as PRC-US normalized their relationships. Basically, at this point, PRC was already a permanent member of UN security council and recognized nuclear state with both fission and fusion weapons and appropriate missiles, hence there is no need to continue the charade.
How is this event related to our main topic? Well, US is not stupid at all. After the second Taiwan strait crisis, it realized while Chiang (and his son) is their ally, he is still a Chinese at heart. It is much better for them to get the Japanese to oppose China. Hence why they gave administrative control to Japan instead of Taiwan.