Why did the us become invovled in Vietnam?

The USA wanted South Vietnam to be a free and independent nation, separate and apart from the communist North, the way South Korea is independent of communist North Korea. The main problem with that idea, was that South Vietnam was a corrupt and ineptly run government that was unable to defend itself when the USA pulled out in 1973; and S. Vietnam fell in 55 days to an invasion by N. Vietnam in 1975.