In my opinion, there were two reasons for the American generosity toward Europe
America was flush. It was entirely untouched by the war, and instead had grown exponentially stronger.
Importantly, post-war America had a historic amount of excess capital.
American citizens had accumulated monstrous savings (today the average American is a net debtor). The reasons for these were kinda twofold - historically low unemployment, and hard limits on consumption due to rationing and limited wartime consumption.
The post-war boom absorbed a lot of this capital, through:
1) The GI Bill - which was great for the education and housing markets
2) The suburban boom
3) Construction of highways and other vital national infrastructure
But there was still a lot of money left over, with nowhere else to go within the United States.
At the same time, the return on investment for that capital was significantly higher in Europe and East Asia than in America itself.
So we can put the "generosity" aside.
The Communism aspect was much more relevant. Communism meant an almost certain and permanent loss of a market for US goods. Less Communists - more consumers.