Due to the fact that the Soviet Union funded the North in the Vietnamese war.
This is a bit beyond my area of speciality but I can give it a shot.
There was indeed a plan by the US government to embroil the USSR in a long, bloody conflict. For example, Jimmy Carter's National Security advisor Zbigniew Brzezinski was quoted by Le Nouvel Observateur as saying:
That secret operation was an excellent idea. It had the effect of drawing the Russians into the Afghan trap and you want me to regret it? The day that the Soviets officially crossed the border, I wrote to President Carter. We now have the opportunity of giving to the USSR its Vietnam war. Indeed, for almost 10 years, Moscow had to carry on a war unsupportable by the government, a conflict that brought about the demoralization and finally the breakup of the Soviet empire.
This fit into the overall pattern adopted by the United States government from around the '80s onwards; force economic hardship open the USSR through proxy wars and arms races until their economy finally collapses. To do so, the US (matched or even surpassed by the Saudis) funnelled millions of dollars through US Government held Swiss bank accounts into the pockets of both the Afghan Mujahideen and the Arab contingents (such as Bin Laden's) who followed.
President Carter also instituted the Carter Doctrine (later expanded by the more general Reagan Doctrine), which stated that the US would not allow any other power to gain control of the Persian Gulf. The USSR lacked warm water ports, and expanding down into the Middle East uncontested would have given them ample opportunity to seize some. Additionally, if the Soviets gained control over the Straights of Hormuz, they would be able to control the flow of the majority of the world's oil and cause untold problems for the West. So while the war could be viewed as revenge, it also fit into a grander strategy that the US held: protect US interests and bleed the USSR into collapse.
For more reading I would suggest The Looming Tower: Al-Qaeda and the Road to 9/11 by Lawrence Wright. It is where much of this information came from and, even though it focuses on the Arab Mujahideen who transformed into Al Qaeda, it is superbly written and shows how US policies and focuses (or lack thereof) contributed to their rise.