So it was not only about money. Although the financial problems were certainly one of the biggest root causes.
Then soviet system had faced several humiliating defeats a few years earlier, robbing it's system of it's facade of invincibility - the invasion of Afganistan and Chernobyl disaster among them.
In the mid eighties, the oil price crashed, and in order to feed the USSR, they had to take out increasingly large hard currency loans, which eventually got so big, that the only way to make them happen was with western government backing. The (implicit or explicit) condition was that if they rolled tanks in Poland or East Germany, the money, and hence the grain, would be cut off. Gorbachev said in an interview that in 1988 or 1989, the USSR was months away from mass starvation had the imports ceased.
Some give Reagan credit for convincing the Saudis to pump more oil and set this chain of events in motion, but I have no idea if that's true or not. Of course I'm disregarding why exactly it was that the USSR couldn't produce enough food with the massive amount of arable land available to it, or why it exactly there were these pro-democracy movements popping up in Poland and East Germany and other places in the Warsaw Pact.