Indeed. Because they got curb stomped and they'd had enough.
Don't worry, honey. It can happen for Russia again in Ukraine.
Soviet invasion of Afghanistan, military action carried out in late December 1979 by Soviet troops. The Soviet Union intervened in support of the Afghan communist government in its conflict with anti-communist Muslim guerrillas during the Afghan War (1978–92) and remained in Afghanistan until...
www.britannica.com
"The war in Afghanistan became a
quagmire for what by the late 1980s was a
disintegrating Soviet Union. (The Soviets suffered some 15,000 dead and many more injured.) Despite having failed to
implement a sympathetic regime in Afghanistan, in 1988 the Soviet Union signed an accord with the United States, Pakistan, and Afghanistan and agreed to withdraw its troops. The Soviet withdrawal was completed on February 15, 1989"