In 2013, Qatar allowed Taliban to open a bureau in Doha, having support and request from American Administration led by Barack Obama. At that time, Washington has been looking for a spot to negotiate with Islamist militias, in order to prepare the withdraw of troops from Afghanistan.
Starting from 2018, Abdul Ghani Barandar has been Taliban representative in Qatar and has acting as chief-negotiator in discussions with US and Azeri ex-government. He had been released shortly before from a Pakistani jail at American's request, after being arrested by CIA in 2010. Also, he signed last year a so-called "peace accord" with US in Doha, which became a cheap sheet of paper, after rapid Taliban taking power in Kabul.
Even after Kabul fall, Doha seemed not having motives for a foreign policy more restraint, and some critical voices have accused it of complicity with international terrorism. For two decades already, Doha offered itself as a mediator in regional policy, especially for improving its own position in relation mainly with Saudi Arabia. Creating Taliban bureau, Qatar confirmed the fact that it is dependent of the US protection and hopes to decrease Saudi influence.
But this policy often generates unfriendly gestures: in 2017, Qatar was boycotted by Saudi Arabia, Arab United Emirates, Bahrain and Egypt, and the problems still exist with these countries. Taking a mediator role, Qatar hopes to reinforce his position in relation with western countries, but it is still unclear how much influence the Emirate has upon Taliban, as its former relations with them have been at odds in the recent past.
Officially, Qatar embraces Wahabi dogma and it is not interested that Taliban lead Afghanistan through violent means. Therefore, Doha intends to act as mediator, for being spotted on the regional and international policy map. In this way, it can awaken the interest of western countries, China or Russia, for maintaining it as an independent state, while some neighbors, like Saudi Arabia, believe the contrary.