Good for him. It is good for troop morale to have the president visit.
UPDATE: The president flew there and signed a strategic partnership agreement for our continued presence in Iraq for the next decade plus:
Obama is joining Afghan President Hamid Karzai to sign the agreement that will broadly govern the US role in Afghanistan after the American combat mission stops at the end of 2014 - 13 years after it began.
While I'm happy that President Obama flew all the way to Afghanistan to ensure we can continue to support the war on terror in Afghanistan, the contrast to his unwillingness to lift a finger to do the same for Iraq where al Qaeda still exists is extremely frustrating.