The Nazi Party used the term "Socialist" in its name primarily for propaganda purposes to attract votes from the working class and to co-opt a popular political term in post-World War I Germany. In practice and ideology, Nazism was a far-right, racist, and anti-Marxist movement that brutally suppressed actual socialists and communists once in power.
But lets not let facts get in the way of things shall we?