In the 1950s, it was feared that the communists would take over huge chunks of the world. After WW2, the USSR got most all of Eastern Europe and installed Communist governments. On 1949, Mao Tse Tung took over China and turned it Communist. North Korea turned Communist (hence the Korean war).....During the 50s, there were movements in many SE Asian countries to go Communist. This was known as the 'Domino Theory', meaning it was thought that all of SE Asia would go Communist.
The U.S. felt it was in their best interest to take a stand against Communism and South Vietnam was where they chose to do it. The 'Red Menace' was to be fought there, instead of trying to invade Cuba, which Castro had taken Communist within a year of his takeover in 1959. The U.S. did not want to tangle with the USSR that directly supported Cuba, but did go to war with North Korea and North Vietnam, who had weaker Chinese support.