Doping certainly did too, but it`s true that sport was very important there because of dignity + it was the only way to break out of poverty in the provinces, improve one's status, go abroad, etc. These are the two main factors.
However, you can invest in sports if you are a highly developed country, e.g. the UK: in the 1990s they were very weak and in 1996 they had a disastrous result in Atlanta. This hurt their pride and they invested a lot in sports + organizing the games in 2012. in London was the height of their glory. It made similar progress in the 21st century: The Netherlands, which now performs on par with Germany: a much larger and equally rich country.