Earlier quoted context omitted.
China has never been a western ally
Perhaps you are forgetting WWII, when China was a main member of a group which literally called themselves "The Allies" https://en.wikipedia.org/wiki/Four_Policemen
It was just a group with a common enemy for short a time. Take Stalin, also part of "the Allies", he had invaded Poland together with Hitler and also invaded Finland. Couple of years later he was fighting Hitler because he got stabbed in the back by Hitler. And after WWII the west got into the coldwar with Stalin.