The real underlying answer is that socialist governments bought into the Western propaganda narrative of "legitimacy." This is where, if socialist governance fails to deliver economic growth, it loses its "legitimacy" and should then be overthrown in favor of capitalist restoration.
Socialism, therefore, is not seen of intrinsic value in of itself, nor are the socioeconomic achievements and benefits of a socialist society recognized. The "purpose" of socialism is solely for delivering and maintaining perpetual economic prosperity agnostic of externally suppressive economic pressures. This is due to the cyclical nature of 1) socialist governance buying into the need for "legitimacy," 2) pursuing "legitimacy," 3) creating public cognizance in their population on the idea of "legitimacy" - and 4) then setting their own population's expectations on the necessity for their governments to maintain this "legitimacy or else ..." approach - which then further 5) reinforces the narrative of "legitimacy" for socialist governments.
Meanwhile, all of this happens as Western propaganda further eggs on the narrative through channels like Radio Free Europe which expands the class of capitalist restoration comprador aspirants in those socialist states.
The 80s were a time of international economic headwinds through the export of the fallout of Reaganomics to the global economy. This caused economic crises most famously in places like Japan, but even though the rest of the world was going into the shitter through the American weaponization of their financial hegemony under Reagan to rescue their own domestic economy, socialist governments weren't "permitted" to stumble themselves, even though everyone else was, through the buying in of the "legitimacy" narrative.
Governments in the Warsaw Pact and Yugoslavia then, through desperation in maintaining "legitimacy," approached the IMF with its poison pill loans and structural adjustment program austerity mandates. Because the conditions of these loans were purposely designed to sabotage socialist societal stability, this then further exacerbated the economic stagnation such that eventually the socialist governments fell victim to the appeal of pursuing the ultimate Western poison pill - shock therapy - which led to the collapse of these socialist states.
The result was that, rather than being overthrown by the collective people as Western propaganda had fantasized, these governments voluntarily, and unilaterally, committed suicide due to the idea that they, and the entirety of socialism, had "lost legitimacy" and the only remedy to this being full-on capitalist restoration.