Barack Obama’s principled opposition to the war in Iraq in 2008 gained him a lot of attention and a lot of support. For some people, it was the deciding factor in supporting him over other Democrats. He wasn’t tainted with having voted for the war.
What some may not have noticed then, or perhaps don’t remember now, is that Obama always separated Iraq and Afghanistan. Iraq, he said, was “a dumb war,” and “a war of choice,” the wrong choice. He never said those things about Afghanistan.