Repeated games are different from single turn ones
Repeated games are different from single-turn ones. While in the single-turn case defect seems optimal, when played repeatedly, Robert Axelrod showed in The Evolution of Cooperation that the optimal strategy is “nice tit-for-tat”. But a key insight here is that this only works if the total number of turns is unknown. If it is known there will be a defection cascade by reasoning from n-1 on to to current turn.
When it was made clear that US troops will pull out of Afghanistan an indefinite repeated turn game was converted into a finite one. With eventual defeat confirmed, resistance was likely deemed futile. Defect at every step was chosen and the predicted timeline of defeat was dramatically shortened.