It was for racial purity. At the time eugenics was a big deal, it stated that some genes which were exhibited as external traits were superior. Hitler was attempting to create a better world by performing artificial selection.
As much as his ideas and methods were bonkers and would never work the fact that humans have stopped evolving naturally is something that some people still want to change.
More information: http://en.wikipedia.org/wiki/The_Holocaust#Development_and_e...