Why did John F. Kennedy feel the need to stand up against communism in Vietnam?

NSC during the time JFK predicted that f Vietnam falls under communists- it might spread communism in SEA. so that's why gulf of T incident entered in order 2 prelude to war w/ usaf aided..