Don’t know how much truth this has. But if it is i guess the taliban Is aligning themselves with partners
ISIS was at one point "Al-Qaeda in Iraq", and after the American invasion branched off and became that **** show.
Even so, they attract certain elements of Al-Qaeda, such as Al-Nursa Front (Al-Qaeda In the Levant) during the Syrian Civil War who worked with them for a while.
These types of strange bedfellows is common throughout the Middle East. Part to keep your enemies close to prevent them from fighting you, part to increase your numbers and use them as cannon fodder for a common enemy.