The War on terror started by attacking Afghanistan, If USA leaves Afghanistan, then the WOT will be officially over and if the WOT finishes then on the military side, there will be no justification for weapon R&D, billion $ arms trade market, and weapon testing of newer weapons. China and Russia are not an excuse enough to keep formations active in the land, air and the sea and neither are China and Russia offering active direct confrontation. There are US CBG's in the seas already, USAF, USMC and US Army is deployed in many countries overseas, whats more that Pentagon needs for an active military? An active Battleground aka WOT. Strike anywhere masking it a terror threat and name it WOT. Egypt, Libya, Iraq etc. But when confronted by a real threat (Syria-backed by Russia), then pack up and get deployed in Afghanistan permanently.
USA can effectively monitor China and Russia from satellites. Pentagon will not take a risk to directly use military forces against Russia and China, which might be seen as a premise to keep forces in Afghanistan. Iran is not a military target also. Military Confrontation with Pakistan is also risky to supply lines and intel support, as seen in the past. Secondly, when there is trend of use of proxy outfits, why put uniformed boots on the ground against China, Russia, Iran, Pakistan. This has been effectively done already against countries in the past.
On the non-military side, WOT is an effective tool for propaganda war, for keeping the fear alive in the public that the enemy can hit on your house door step. So unlike Vietnam war, where the public didn't see any threat and knew that peace can exist, the WOT is covering an uncertain handle of destruction, terror, which can strike anywhere any time anyone. This also keeps the US public and public other European countries minds tilted towards security as first and foremost agenda. Any Government can win sympathies of public through WOT. Public's attention can be diverted any time from any issue through a small gain or a small loss in WOT. Show this repeatedly on media and public will be forced to "safety first" principle, lighting-up the patriotism and love for american troops as heroes.