There were many reasons not to be surprised by President Barack Obama‘s announcement Wednesday that 8,400 U.S. troops will remain in Afghanistan by year’s end—more than the previously planned drawdown level of 5,500.

The White House has telegraphed concerns for several months about Taliban territorial gains across Afghanistan and about Islamic State’s gains in eastern areas, where several thousand former Taliban militants have thrown their allegiance to ISIS. In recent weeks, the Obama administration has eased restrictions on U.S. forces fighting the Taliban. It has also intensified airstrikes on ISIS-aligned militants in eastern Afghanistan.

It would be pure folly for the U.S. to intensify its fight in Afghanistan against two of its chief foes and then promptly cut troop levels by nearly half. Given the increasing responsibilities of U.S. troops, reducing the number of U.S. troops by 1,400 makes more sense.

Still, let’s be clear: The change in U.S. troop levels will not produce major improvements in Afghanistan’s security. Troop levels are not a magical elixir for bringing stability to Afghanistan; more than 100,000 U.S. troops did not bring peace and calm to the country or end its long-running war. The Obama administration knows that there is no military solution to the conflict; that’s why it has pushed hard for a peace process between the Afghan government and the Taliban. That, however, is unlikely to happen anytime soon.

For these reasons, taxpayers might reasonably ask why any U.S. troops should remain in Afghanistan, particularly when the cost of supporting a single soldier in Afghanistan exceeded $2 million annually in recent years.

The administration’s thinking is simple: Maintaining troop levels close to current numbers allows the U.S. to continue training and advising Afghan forces, with particular emphasis on resolving deficiencies in air support and intelligence collection that have long inhibited Afghan security capacities. That may not be a satisfying answer for U.S. taxpayers, or critics of Mr. Obama’s policy who believe that more troops are needed to ensure that one of the very early U.S. achievements in post-9/11 Afghanistan—the removal of al-Qaeda sanctuaries—is not reversed.

Many in Kabul were relieved by Mr. Obama’s announcement. For Afghanistan, the biggest implications of this change are psychological. Afghanistan is heavily dependent on foreign military and economic support, and many Afghans worry that they will be abandoned by the West in a repeat of what happened in the 1990s. Significantly reducing the U.S. troop presence would have been demoralizing for beleaguered Afghan soldiers and statesmen alike for security ramifications as well as the impact on development assistance. That can be only as robust as the security presence protecting those implementing the aid in villages and towns across Afghanistan.

The big picture is not lost on Kabul: So long as the Taliban has sanctuaries in Afghanistan and neighboring Pakistan, and so long as economic malaise, rampant corruption, and violent militias make life so miserable for ordinary Afghans that some view the Taliban as a better alternative to the government, then war will continue—no matter how many U.S. troops remain.

The opinions expressed here are solely those of the author.

This article was originally published in The Wall Street Journal's Think Tank blog.