It is often ignored how much the Nazis despised communism.
The social group most supportive of the Nazis were business owners who were resentful of the banks to which they had to pay loans and rent, but who were also hostile to leftwing movements such as the labor unions and universal suffrage because they thought if the workers started voting and joining unions then they would out-vote the middle-class and start demanding pay rises.
From this perspective you can see how the Jews came to be targets. If your goal is to attack both communism and the banks, then antisemitism is the tool to use because the trope that the Jews run the banks is ancient, and several several prominent communists were of full or partial Jewish ancestry including Karl Marx, Rosa Luxemburg and Leon Trotsky.
It's not totally out of the question that eradication of communism was the main goal of the Nazis.