This is par for the course for US foreign policy in the region.
There's even (disputed) allegations that Bush Sr funneled money and weapons to bin Laden in opposition to the Soviet invasion of Afghanistan. If true, the big 2006 enemy was a 1986 ally.