Edit: I don’t intend to say that Germany is or ever was a bad place. I actually am German. I just wonder why this was such a widespread phrase that seems kinda unexplained.
Hello, German and Politics student here (hope that's okay).
Richard J. Evans (former Cambridge Professor of Modern History) discusses this at the beginning of his book 'the Coming of the Third Reich' and it's touched upon in other books like 'Iron Kingdom' by Christopher Clark (Evans' successor at Cambridge).
There's a couple of different things which need to be pointed out. I have a book in front of me at the moment from 1926 'Teaching Book of History' which traces Germanic history back to the first Century AD and the unification of 'Germany' around 900-1060. This was referring to the Holy Roman Empire of the German Nation (Das Heilige Römische Reich der Deutsche Nation). When you hear people referring to the 'Third Reich" (Drittes Reich) this is the first one. It's not really an empire as it wasn't expansionary, although it was a Reich in the sense of the word 'realm'.
As a consequence of the Napoleonic Wars the HRE was dissolved. In it's place were many, many independent states which were much more loosely tied together than before. In response to the French humiliation of the people of this region (as they perceived it) nationalism started to rise, banding the various German peoples of the region together. The idea developed merely from being a response to the French but instead to being a more positive, ideological vision which called for a united Germany. In the 1840s this reached somewhat of a pinnacle, where there were nationalist uprisings across the country which threatened to overthrow many of the different governments (the Prussian King is reported to have feared for his life, believing that he might have his head removed on Bebelplatz). National elections were called and a parliament sat in Frankfurt am Main.
In the end this turned out to be a rather feeble institution and the revolutions were suppressed (sometimes violently), but the idea of a national Germany lived in. A lot of German nationalism centred around the figure of Bismarck. He was a very talented individual who is likely responsible for forming the bedrock of Germany as we know it today. He left a great legacy on the world, most notably by uniting the majority of the German states (except for Austria) under rule from Berlin in the 1870s. This was the second German Empire (Zweites Reich). He also had the good fortune to live for some time after being fired from the job by new Kaiser, giving him time to write memoirs and enter publishing deals which somewhat brought to attention his achievements and put them in the spotlight. He remained a public icon and a father figure of the new Germany well into retirement and afterwards. It is this second empire which National Socialists referred, and specifically to the person of Bismarck. Bismarck fulfilled much of the Nazis fetishisation of 'great men' as the source of real change in history (and they named many things after him, to draw attention to this history, see here.
The German Empire (German Empire #2) then - under a new chancellor - fought in World War I. People on the home front had lots of faith that Germany would win the war, and negative reports very rarely found their way back home from the front lines. Those running the war could see the situation turning ever worse, and eventually surrounded unconditionally before Allied troops reached Germany. This ended up being a sticking point for the right - they never believed that the second German empire lost the war, but instead that it was sabotaged from within. They had strong faith in their soldiers and in their generals (such as Hindenburg, who a the famous blimp was named after, in the same war the Bismarck battle ship was thusly named). It was inconceivable that they would lose.
The Empire was dissolved, and the royal family (the Hohenzollerns) lost their special status. The second German empire became the Weimar Republic, a state that was plagued by problems from the outset and some believe was doomed to fail due to its electoral system as well as the conditions set on it by the Treaty of Versailles.
When the Nazis stormed to power they believed that the German Empire would have won the war if it weren't for being stabbed in the back by 'traitors' (usually jews) and that times were better back then.
It is my understanding that the Weimar Republic was considered something of a cultural golden age for Germany pre-WW2. I believe this is what the OP is referring to, or can someone can expand on this as well?