Almost from the outset, Hitler and the Nazis knew that they want to make the Germans genuinely happy. To achieve this (by itself highly noble) objective, they needed to perform a radical reengineering of Germany transforming the depressed, defeated, humiliated nation suffering from enormous economic hardships into a secure, prosperous and genuinely happy nation – a political, economic and military superpower.
To successfully perform this radical reengineering, they needed not only highly competent leaders and managers, not only to make the right decisions, but to get the most (in terms of productivity) out of just about every German.
To make it happen, they had to provide just about everyone in Germany with an extremely powerful inner drive. And the cold hard truth was (and still is) that in order to maximize the power of this drive, you have to provide your citizens with not just an ideology but at least an ersatz religion.
To make sure that the horrors of the Blockade of Germany and the resulting hunger of 1917-19 (that claimed half a million lives), Nazis made a firm commitment to obtain (via invasion and occupation) sufficient Lebensraum to make it self-sufficient in foodstuffs and other key natural resources.
Which meant war on the Eastern front and very possibly on the Western front as well. And to win this existential war, you need not only the competent leaders and commanders, not only to make the right decisions but to get the most out of your every soldier.
To make it happen, they had to provide your every soldier, every officer and every general with an extremely powerful inner drive. And the cold hard truth was (and still is) that in order to maximize the power of this drive, you have to provide your soldiers with not just an ideology but at least an ersatz religion.
To make your citizens genuinely happy, you must satisfy their aggregate needs – financial, functional, emotional and spiritual. And another cold hard psychological fact is that to satisfy the spiritual needs of your citizens, you have to provide them with some kind of religion (yes, atheism, secularism, agnosticism are religions, too)
For hundreds of years, this religion (at least in Europe) was Christianity. However, it was not of much use when one Christian nation was fighting another Christian nation that practiced a similar version of Christianity (which was the case on the Western front).
In addition, the Sermon on the Mount and similar commandments were not exactly very helpful in an existential war. Consequently, the Nazis (whether they wanted it or not) simply had to create an alternative religion. And given the fact that the Nazis were fierce German nationalist, there was only one place where they could find it.
In the pagan, pre-Christian German past.