They won first place in the 1984 Sarajevo winter games but third place in the 1972 Munich summer games. In 1990 their population was only 16 million.
They used a lot of performance-enhance drugs. The state-sponsored doping program even have an official name: State Plan 14.25. Athletes were given steroids or large doses of testosterone without their knowledge and many developed serious health issues later in life. To avoid being detected they stop using the drug just long enough for the drug to be undetectable and they conduct their own drug test right before international events.
They had a system where children with athletic potential were scouted from schools at a young age, and then were given extensive training. Also, as /u/cecikierk has mentioned, they used performance-enhancing drugs. China continues to use a similar system to this day.