The deal was brokered by Pompeo while Trump was still in office. Biden just went through with the plan that was already arranged. Remember, Pompeo is 'former' CIA, Afghanistan was more a CIA op than anything, and the new 'Taliban' are almost certainly CIA assets (hence them allowing poppy this time).