Well I’m no military strategist but nor is Trump. Easy of course to criticise him in hindsight but he ignored his advisers and spoke to the Taliban without the government in the room, made a deal to release fighters, delegitimising the government and its army. I wouldn’t have done that.
There have been very few allied combat fatalities in Afghanistan for the last 2 years, their role was now to train, advise and support their military. Politically popular of course to withdraw troops, but the role of the military is to protect, defend and improve, which they have spent 20 years doing to great effect, at great cost. To withdraw was a choice, not because their mission was been accomplished, or their presence had become untenable, or they were no longer welcomed by the host government. Allied involvement in the country was perhaps a price worth paying long term for the stakes being played. To leave so abruptly, too early, disrespects the war effort, risks basic human rights like female education and corporal punishment in Afghanistan, and al quaeda terrorism around the world.