A gambler, playing "a game of chance", is motivated by two emotive factors: (1) hope of winning and (2) unwillingness to accept defeat.
He joins a game hoping to win, and, if he wins on the first try, he becomes bolder and goes for a second try, hoping to win again. But, unless the game is "rigged", few gamblers, if any at all, are so lucky that they win on every try, so sooner or later he loses. And. once he loses, he is faced with the following situation: if, he does not try another go, he has lost, but, if he tries another time. he might win and recover his loss. And this unwillingness to accept defeat is the main reason why gambling addicts are driven to total financial destitution and even end up in jail, having been driven to commit crimes to finance their gambling addiction.
Such addictive gambling is not restricted to games of chance, but can be also observed in business, wars, and politics.
In business, most bankruptcies are due to business people unwilling to "accept defeat". Having discovered that a business is not producing the hoped for profits, a rational businessman, having considered the situation and come to the conclusion that spending further money on the same business is unlikely to produce the profits he seeks, would close the business and deploy the remaining resources in a different area, while a gambler, unwilling to accept defeat, would keep sinking more and more money in the same business, until he becomes insolvent and is proclaimed bankrupt.
Such unwillingness to "accept defeat" is even more common in behaviour of political governments. Having started a war of aggression and occupation, and failing to achieve the hoped for results, an aggressive government will continue to send in more and more troops, because, to stop a war and withdraw would mean "accepting defeat". And, as, unlike private people, politicians do not finance their gambling with their own money, nor do they risk their own lives, there is even more incentive to fight "till the victory is achieved", even if they have no idea what this "victory" means and how to achieve it. The American War in Vietnam, and the Russian Afghan War, are examples of such addictive wars, which were ended only after millions of people had been killed without the aggressors having achieved any benefits for themselves.
The difficulties that the politicians have in abandoning failed policies and discredited ideologies is another example of unwillingness to "accept defeat". They keep "fighting on until the bitter end" discrediting themselves more and more until they are totally discredited and slip into "unelectability", while abandoning their failed policies and discredited ideologies would have enabled them to stay in government for generations. But this means "accepting defeat", and "swallowing their pride" and few politicians are capable of that.
Following the events of 9/11 (destruction of two buildings in New York, and of a part of the Pentagon building), Benjamin Netanyahu's "War on Terror" doctrine was adopted by the governments of the USA, Britain, and their followers as their main political ideology. This ideology was used to justify the American wars against Afghanistan and Iraq.
As the Iraq War had become unpopular, and had led to "regime changes" in the USA and Britain, there has been some change of "tone" and vocabulary by the new administrations, but the war against Afghanistan is still being justified by the War on Terror argument: "Unless we defeat the Taliban extremists, they (or the Al-Qa'ida) will attack us again in London or New York".
This is a false argument, because the Taliban are fighting the Americans and their allies only because they had invaded Afghanistan, and once the invaders leave, they will not pursue their armies and invade the US and Britain. And, as far as the 9/11 style "terrorist" attacks, none of them was either inspired, or planned, or executed by the Afghans. And such attacks can be planned and executed anywhere in the world, and cannot be prevented even by the total (Hiroshima style) obliteration of Afghanistan. And as far as the inspiration for such attacks is concerned, the source of their inspiration is the American "Foreign Policy", not the Taliban of Afghanistan.
So, the threat of "accepting defeat" in Afghanistan is not to the "security" of the USA or Britain as countries, but a very real threat to the members of the Political Establishment of having to "swallow their pride" and honestly acknowledge their own criminality. But such acceptance of defeat has little practical danger for them, it is even a way to re-establishing their own credibility with their own people and of preventing their own "political demise". But the political instinct is to never accept that one is wrong and always to keep glorifying oneself and vilifying some real or imaginary "enemy". And this is why the Afghan War is likely to continue "till the bitter end", unless Reason prevails over the Political Instinct. But this would be a "miracle". And miracles are very very rare and unlikely events.