This is a sunk cost fallacy, and staying there indefinitely would cost wayyy more in blood and treasure than cutting our losses. Ridding Afghanistan of Bin Laden and old al Qaeda was the mission, right? It was accomplished, right? When will western states learn that Afghanistan is called the graveyard of empires for a reason?
Your notion that the "Terrorists" who will base out of Afghanistan will cost more American lives than leaving is baseless speculation. Not to mention we face threats from terrorist groups who reside in a whole mess of different countries around the world.
Also, leaving Germany and Japan is one of the worst ideas I've ever heard. I think
@pgg can explain more eloquently than me why that is.