The US had a presence there since 1950's, even before that if you count the OSS operatives during WWII. Our involvement was to stem the tide of Communism, and also to step in to fill the gap after the French were leaving to comply with the Geneva Accord of 1954.
In the context of the times, fighting Communism was a more important and justifiable pretext than oil.
It seems apparent that actual motives changed and got muddied as the scope of involvement became lengthy.
In the end, US objectives are actually beginning to be realized, and that area of the world moves to more of a self determined free-market based economy. It is a shame that there had to be so much suffering of the general population AFTER US withdrawal to see this come about.
I have read memoirs and interviews from former Viet Cong of how they were immediately disenfranchised when the South was overrun, (and they were on the same side as the North, and did much of the dying at the hands of the US!), so one can imagine how bad it must have been for the remainder of the population.