To an extent, this defies logic. It also absolutely defies historical fact.
In case you've forgotten, the Taliban played host to Al Qaeda in Afghanistan, back at the turn of the century.
Now, what do you imagine would happen if the Taliban, once again, managed to gain control of Afghanistan ? Do you know that they would NOT, again, facilitate groups such as Al Qaeda ?
If this came to pass .. what do you think would follow from it ? A determination to go BACK to Afghanistan and finally finish the job ? Or, would Lefties instead unite in a chorus of 'This is unwinnable .. we must sit back, keep clear of Afghanistan altogether, and adopt a bunker mentality to security instead' ?
In such a scenario, security forces must always successfully defend against threats, the scope or severity of which they cannot control, because they're not stemming the cause of them at their source.
The issues you raised are interconnected, all important, all requiring the proper, remedial action to best serve America's security needs.