There is a pretty simple “explanation” for Afghanistan. It is an example of the necessary, if unpleasant, projection of American power in order to kill our enemies. Now the efficacy of that project can be questioned no doubt but not the intent.
My own view is that we need bases in Iraq and Afghanistan far into the future.
The current ROEs suggest otherwise. If that is the objective it would be better to go in and seriously break stuff, then wait a short while to see if the lesson needs to be repeated.
Killing off two generations should result in 40 yrs. of relative quiet.