http://nhs.needham.k12.ma.us/…/ Gives a good answer to your question. In brief, Soviet Russia wanted to shore up a failing Communist government and stop the spread of western influence across central Asia. The difficulty for Russia, and indeed for today’s US and UK troops, is that the Afghan people have a very different culture and don’t want to change in the ways that we want them to change. True, Russia could have used all its might and crushed the Afghan people, but other political motives stopped that. Eventually Gorbachev decided that the cost in human life was not worth the continued toe-hold in the area. Since then US have wanted an excuse to invade and modernise the country. Their efforts are proving just as futile, and the Afghan people will continue as they have long after we decide to abandon our positions and admit defeat.
It was actually over an oil pipeline if I recall… the very same oil pipeline that twenty years later Saddam Hussein was going to control and threatened to keep the oil from Europe and sell it to the russians instead. So the whole thing came round full circle in a lot of ways. During the russian campaign in Afghanistan the US was supporting the Mujaheeden and trained a fellow by the name of Osama Bin Laden to fight the Russians, You may have heard of him… sometimes referred to as Osama Been Forgotten because no one can remember in the US that he worked for us before he ‘went rogue’… if that’s what happened.
It isn’t likely that the Soviets would have annexed Afghanistan to the Soviet Union, as such an action would have sparked greater resistance on the part of the Afghans. The Soviet invasion was sparked by the weakening of a Pro-Soviet Communist Government in Afghanistan. The Afghan government was failing and the Soviets sent troops to try and prop up their falling “ally”. The West immediately sided with what would eventually become both the Taliban and Al Qaeda as they were the ones creating the instability in the Afghanistan government and prompting the Soviet invasion. But, because the Soviets were the “Evil Empire” America began funnelling money and arms to men like Osama bin Laden so they could fight the Russians and turn Afghanistan in the USSR’s “Vietnam”. Had the Soviets won the war, the proxy Communist government would have remained in power and likely reinforced, along with an almost genicidal campaign against the southern tribal peoples that flocked to those that fought agains
Afghanistan became communist all on its own, and, shortly after, it lost all its popular support and faced massive rebellion. The USSR would not have made Afghanistan a republic, but rather a semi-independent country, a protectorate of sorts, like those in Eastern Europe and Mongolia. Another motivation was that with an increasing number of loose American alliances with various middle eastern countries, and very solid ones with Iran and Turkey, both of which bordered the USSR, the Soviets feared the Americans would convert the largely neutral Muslim world to their side, altering the balance of power. There were some communist Muslim states (South Yemen, Eritrea, etc.) but one more never hurts, especially when its right between you and Iran, who had very close ties to the US after the Americans destroyed their democracy in favor of despotism to insure British companies got all the profits from Iranian oil. It is so bullshit that we claim they’re in an axis of evil for hating us.