There was great fear of communism in the 1920s. Spearheaded by A. Mitchell Palmer, the red-scare was felt by most Americans. Employers were able to squash labor union strikes by insinuating the leaders were communists, immigrants were expected to prove their loyalty, the KKK was able to take advantage of the fears and grew to phenomenal numbers.
Hoping to balance the growing power of the Axis countries, Roosevelt opted to acknowledge Russia as a communist country during the '30s.
By 1941, Hitler had turned on the Soviets and "our enemy's enemy is our friend" became the attitude of politicians. Better to befriend the communists in order to defeat Hitler/Mussolini/Tojo.