We could have stayed indefinitely at the low level of forces and engagements that we have had since 2014. In the last 7 years, we have lost 66 personnel and spent about $10 billion--a rounding error in the federal budget--a year.
There has been no groundswell of public opinion demanding that we get out. Both presidential candidates promised--for various reasons--that they would get us out, and the Trump administration made the deal with the Taliban in early 2020 setting an end date. At that point, the Afghan army, such as it is, began surrendering and melting away. They were prepared to fight while we were there--over 50,000 of them died fighting alongside us--but not to fight once they knew that we were abandoning them.
If we weren't going to stay, then why did we go in? The point was to eliminate Afghanistan as a staging ground for Islamist terrorism. We toppled the Taliban by early 2202, but we never eliminated them. Afghanistan will now go right back to being what it was on 11 September 2001. And if we have to go back in and do it all over again, we will find next to zero Afghanis who will be willing to work with us.
Why did we sacrifice blood and treasure if we were not going to stay the course?