The difference being...
That of course there _are_ al-Queda (or similar) terrorist training camps in Somalia, just as there were in Afghanistan, whereas the "cancer" of a failed state gradually being turned into a terrorist playground doesn't exactly describe Saddam Hussein's Iraq.
Recall that the vast majority of Democrats did and do support the war in Afghanistan. In Iraq's case we chose to apply a very expensive treatment, which we have in short supply, to a patient who -- while suffering pathologies of his own -- didn't have the kind of cancer you're claiming we were trying to treat.
