The US motivation for invading Afghanistan wasn't because the naughty bad Taliban were oppressing women, but because they believed they were harbouring Osama bin Laden.
If we look at history, the Versailles Peace Conference of 1919, as well as liquidating German external territories and an impossibly high reparations bill, democracy was forced upon Germany.
Similarly, the Japanese Constitution was forcibly rewritten by the Americans.
Like many, I opposed the US invasion of Iraq, and some of the nonsensical arguments from right-wingers were that we didn't believe people deserved democracy.
What could be further from the truth? Apartheid in South Africa wasn't abolished because of sporting sanctions or other actions, it was abolished because the people of South Africa said, "Enough!" Similarly, in Iraq, we didn't believe that Saddam Hussein was some poor misunderstood man, who was really quite a nice guy underneath all that, but we feared that yes, he kept a lid on extremists and now, they're flourishing. But let's not forget, the US backed him during the Iran-Iraq War.
You mention Vietnam and some people have claimed that the Vietnamese were on your side one minute and against you the next, but it was more nuanced than that. It wasn't a case that someone joined the South Vietnamese Army and went to the Viet Cong at night, what happened was, Vietnamese business owners who had clients from both sides, said, "Okay, the Viet Cong will be in, tonight. Do you want me to listen for you to see what I hear?" Okay. And they passed it on, and the same for those dealing with South Vietnam. It didn't matter to the US that South Vietnam was a tin-pot dictatorship. When Vietnam was divided into North and South, it was people who spoke the same language, had the same culture but were divided by politics.
Now, the Taliban is having a resurgence. Yes, it was all for nothing, but it should never have occurred in the first place.