Upvote:3
In the early 20th century, China was more to be pitied, than feared. The anti-Chinese sentiments in California were directed against individual people, not the whole country. It arose against the Japanese as well, with the important difference that the hostility was also against Japan as a country.
Japan also posed a challenge to the United States where it was threatened, the Pacific Ocean. During the Washington Naval Conference of 1922, it was Japan, and not China, that was limited to "3" in the 5-5-3 navy ratios. About 20 years later, Japan bombed the U.S. Pacific fleet at Pearl Harbor. China did not that capability. War and hostilities were forced on the United States by Japan.
There was never any chance of China taking over Japan. China was not even a whole country because it was disunited and under the rule of warlords, in addition to competition by the Communist and Nationalist parties. But by the 1930s, there was a real chance of Japan taking over China, or at least a large part of it, and creating a behemoth that was hostile to the United States.
America's policy toward China had been the Open Door Policy that would allow all countries "equal access" to China. Japan wanted to carve up China into spheres of influence, with her getting the largest share.