The Americans thought that economic desperation could lead to extreme politics, such as Facism and - especially - Communism.
The Marshall Plan helped economically develop Western Europe, so that such desparation did not happen. In other words, it helped 'vaccinate'
Western Europe against Communism.
That was the plan. Did this work? Well, significant Communist parties did develop in Western Europe. They became part of ruling coalitions in Italy, and influenced politics in Scandinavia - here, as part of ruling coalitons, Communists would actually become members of the ruling cabinet. But, in no case did the Communists ever come to power in Western Europe.