They ended up in an awkward situation where they could no longer feed their people (civil economy) and fund their gigantic military industrial complex at the same time, the leadership had to make a choice. Gorbachev said f*ck it and chose the civil economy. This didn't help because military spending made up 15% of GDP and the MIC constituted a significant chunk of its economy, its near shutdown reverberated across the entire economy and made an already dire situation worse. The Soviet people, including many in the Communist Party (aside from a few Stalinists), especially the mid to lower level functionaries, grew disillusioned with the whole communist project and helped bring the system down. This was made easier because the ethnic minorities, with the absence of funds coming from the central government, no longer had an incentive to subordinate themselves to Moscow.
The result: a state that can't control its internal borders, military, and feed itself at the same time is no longer viable and so the USSR ceased to exist.