All these so-called attacks in Afghanistan are all false flags conducted by the terrorist-for-hire proxies that are funded by the US empire. The Afghan people and the Taliban want the Americans out of their country. Any attack or hindrance, of the American pull-out, only serves the interests of those, who want the US empire to stick around longer.
Afghanistan has been a huge money maker, for a number of segments, of the Power Okole, for the last 20 years. Those nefarious groups do not want to leave and will do whatever it takes to keep their cash cow rolling. As for the Americans still stuck in that failed state, you can bet they are the "collateral damage" or "cost of doing business", as in the words and spirit, of the late US imperial war criminal, Donald Rumsfeld.