Domino Theory,
If Afghanistan fell, then Russia would have been in Pakistian in a matter of months.
Same as the Iraq and Iran war.
It was important to stop Iran from become a military power since they were on side with Russia.
Your enemies enemy is your friend.
That's the government line.
I honestly don't know if it made that much of a difference though.