There are at least two ways to answer this question.
First, we can look at why the United States thought communism was an evil influence in the world. The basic reason for this is that communism is a system in which people’s liberties count for little or nothing. Communism as a system inherently believes in depriving people of economic liberty. The government controls the economy and people are not free own much property or to do as they wish with what property they are allowed to own. Communism as practiced also had little respect for human rights. There was no right to freedom of religion and certainly no right to freedom of speech or the press, for example. For these reasons, Americans saw communism as a menace to freedom.
Second, we can look at why Americans thought that communism might expand and would need to be contained. This is largely because the Soviet Union grabbed for all of Eastern Europe after WWII. Stalin wanted buffer states between the USSR and the West and therefore took control of all of Eastern Europe. When combined with the fact that communist ideology calls for communism to take over the world, these actions on Stalin’s part seemed like proof that communism was going to try to spread. Therefore, it needed to be contained.