We did have a goal. The building of the nation of Afghanistan into a functioning liberal democracy. Of course Afghanistan barely qualifies as a nation and many (most?) have no desire to live in anything resembling a Western nation-state. Short of a truly brutal, imperialist takeover or the installing of a strongman puppet to do the dirty work for the next 50 years, there's no real chance of transitioning the peoples and their cultures over to our way of things. Americans likely have no stomach for such things, and the state of realpolitik is such that this would be truly untenable on the world stage.