Josh Marshall heads down the path to madness in order to try to answer that question.
The answer is unknowable because there isn't one. There are a variety of powerful actors who have different motives. It's as true, if not more true, for the continued occupation as it was for the initial invasion.
George Bush started the war because Saddam tried to killed his Dad and because he wanted to prance around on an aircraft carrier in a flight suit. He later got stubborn about the whole thing when those mean Democrats started criticizing him, and he began to buy into the transformational rhetoric due to his increasing messianic bent. And, now, it's about his "legacy."
Dick Cheney started the war because of his insatiable lust for the black stuff. Dick Cheney keeps us in Iraq because of his insatiable lust for the black stuff.
Don Rumsfeld went to war to prove that he could achieve any military result with 3 marines, an armed aerial drone, and his left pinky. He stayed in Iraq because George Bush told him to and because he still needed to prove his awesomeness.
AEI and Viceroy Jerry went to war because they were excited about their new libertarian paradise laboratory.
Paul Wolfowitz had grand dreams about transforming the Middle East into who knows what.
Tom Friedman and others went to war because they have the mentality of 5 years olds and they thought that the smartest thing we could do was whip out our giant schlong and wave it around for awhile. Tom Friedman and others stay in Iraq because they think that if they don't keep popping cialis ("If your occupation lasts longer than 6 months...") the world will notice our little tiny shriveled up thingy.
Karl Rove went to war so his boy could prance on the aircraft carrier and win re-election. He stays because leaving Iraq will anger wingnuttia.
Lots of other people stay in Iraq just because they don't like to admit they're wrong. Their egos are more important anything.
The sensible liberals at Brookings were so stupid they thought Saddam was a threat. They were the stupidest people of all, because that was about the only thing which had nothing to do with why we invaded Iraq. They stay in Iraq because they're unable to accept responsibility for their actions.
Democrats went to war because they were scared of losing their elections. They stay there because they're scared of losing elections.
Ultimately it's all centered around oil, the endless needs of the military industrial complex, and various other financial interests masquerading as ideology. But there isn't one reason, just a grand harmonic convergence of wingnuttery.