FedGov under FDR was so heavily saturated with reds that the alignment was a virtual given after Hitler turned on Stalin; however, even if that had not been the case, I suspect we would have still allied with them in opposing Germany. In retrospect it was a mistake, but we have the benefit of 70 years of hindsight. While the war itself was raging the outcome was uncertain and one only need look at the news of the day. We didn't know the full capabilities of the German u-boat fleet. Many in our nuclear program perceived we were in a race against Germany to master the a-bomb and even after Midway, the extent of resources needed to fully crush the Japanese were a huge unknown.
Certainly, aligning with Uncle Joe and conceding eastern Europe to him after the war was a big mistake, but at the time, I suspect the decision made more sense than not.
Until Okinawa, Iwo Jima land bunker-to-bunker slaughters of American and Japanese troops (and the suicides of thousands of Japanese civilians in Okinawa); and the loss of hundreds of ships in the kamikaze suicide attacks, we really had no idea how many hundreds of thousands of Americans - how many millions more of Japanese! - would have been lost fighting in Japan itself.