Answer:
The Soviets invaded Afghanistan to prop up their already failing government. However, due to the loss of almost all support from other countries, they were fought against, and it ended a long, expensive war, which the soviet economy never recovered from. This led to a massive economic downturn, which led them to have very little trade, and run out of supplies and money. That loss of Support, Supplies, and Money, is what eventually caused the Союз Советских Социалистических Республик (Union of Soviet Socialist Republics) to collapse.