Hindsight is always 20/20. When we got into Vietnam the reasons were fairly sound. The major problems started occuring when the White House started directing the war from the situation room, instead of letting the commanders on the ground do what needed to be done.
That's the main problem with most politicians and presidents. They get into office and they have this huge stick called the US Military that they think they can wave around and solve all their problems. Then when they try and use it they find out that once the stick is in motion you can't really stop it until it breaks something. When that happens people die and then the politicians start getting scarred and want to try and control the stick even more, or they realize they're going to look bad for swinging it in the first place.
Somalia is a perfect excample. Clinton wanted to show the world that the US cares and we were going to make sure that the international relief supplies got to the people it was supposed to go to and we were going to hunt down those trying to deny that relief. Everything was going along fine until a blackhawk got shot down. Hundreds of people ended up dead, there was allot of press coverage and it looked bad on the TV. So what happened, Clinton ordered our guys to tuck tail and come home. It wasn't because we couldn't do the mission, it was because of one battle that looked bad on TV and US troops were killed in the process.