No, you're right...to a certain extent. My role is to educate and develop military medical personnel as part of a Bachelor's degree pathway. Many of them haven't thus far been encouraged to think too hard about these sorts of issues until now, so in essence, yes...most (junior) military personnel are neither encouraged nor personally motivated to contemplate their actions or attempt to contextualise them in the bigger picture.
Nevertheless - cynicism notwithstanding - having been out on the ground and seen the legacy of the Taliban's years of abuse, and the grinding poverty and the social dysfunction, those of us who have been there are affirmed in our belief that our main effort is to bring stability and security, and to rebuild infrastructure and to give the Afghan people half a chance of a reasonable life. A chance they wouldn't have had if we had left then to fester under the Taliban.
You may be right, Maxim, that the motivation of our overlords is far more malign and Machiavellian. The snag is, neither you nor I can know for certain. You strongly suspect ill intent, based on whatever evidence you credit with some degree of veracity, whereas the information I have from inside the machine leads me to sincerely believe that our intentions are far more honourable than external critics - liberated by their externality as they are to think and say whatever they like without substantiation - give us credit for.