A US company wanted to build a pipeline through Afghanistan in the 90s. Since the Taliban was in control of the area, the US tried to work with them to build the pipeline, but the Taliban didn't didn't agree with having a pipeline through their territory.
So, the US went to war for the pipeline, and now, in the past couple of years, the pipeline is being built under the Taliban.