The United States aided anti-Soviet resistance movements abroad. He deployed CIA Special Activities Division paramilitary officers to equip the Mujihadeen forces against the Soviet Army. The US funded Taliban mainly to assist in ending the Soviet's occupation in Afghanistan.
The taliban benefited from expanded foreign military support from the United States. The U.S. shifted its interest from Afghanistan after the withdrawal of Soviet Union.
The US funded the Taliban during the time the Soviet Union was trying to invade Afghanistan. The US supported jihad against The Soviet Union. The US supported Taliban funding to prevent the Soviets from spreading their communist empire into the Middle East.
They funded the Taliban in their fight against Soviet invaders. President Regan expanded the program as part of the Reagan Doctrine of aiding anti-Soviet resistance movements abroad. The purpose was to remove from the international scene the horror and possibly a nuclear war between America and the Soviet Union.