Having troops in Afghanistan (and just as importantly an infrastructue to support them) makes strategic good sense. If Iran becomes beligerent they must look to the east as well as the west when planning their defences. In addition Pakistan, none too stable a place on the best of days, is within easy reach if it appears that internal foment might compromise the security of their nuclear weapons. Lastly it irritates the Russians and is reminder to them that they aren't nearly as powerful as they think they are. It's a tradeoff of dollars instead of blood and for those of us who have served it's a great investment.