Consider this - and know that the sum total of my world politics knowledge could fill a pamphlet. However, my cynicism could fill a stadium, and that's more valuable than knowledge when we're talking about our government.
President Obama told us in December 2009 that he would have our troops (i.e. people) out of Afghanistan by July 2011. Some wondered about his timetable, and others appreciated the effort.
What they didn't know was what our government probably did know: That Gadhafi's ass was getting tight over in Libya and that those troops would be needed there by the summer. We do, after all, have an extensive foreign intelligence network, and we pay people al ot of money to take the pulse of hot spots around the world. My guess is that those highly-paid people informed Obama that he'd better get our asses our of Afghanistan soon, because we'll be fighting another war in Libya soon, and we don't have the numbers (or money) to carry on two conflicts.
So, what appeared at first to be a nice gesture by our president was merely personnel management.
He is after all, the Commander in Chief.