The Nazis had all the hard-line right-wing prejudices of the time in a big way. There were many parts of Europe (and surely the US, too) where even the mere mention of homosexuality was enough to send people into a rage or a panic.
Because they weren't like Hitler. Hitler hated everyone that was not of "his kind".
The backbone of the Nazi party consisted of veterans from World War I. These men were steeped in macho, military values. Most of them were also filled with the prejudices of their time, and in a very extreme form. This didn't prevent some leading Nazis from practising homosexuality. The ideal 'Nordic' type wasn't only supposed to be blonde and blue-eyed but also obedient, immune to Marxist thinking and sexually as straight as a poker. Even masturbation was a no-no.
The Nazis made a great song and dance about the Latin slogan 'Mens sana in corpore sano' - 'A healthy mind in a healthy body' - or as critics said at the time:
'A servile mind in a body fit for military service or child-bearing'.
Homosexuality was seen as 'degenerate', Communist and - without
any evidence - also as Jewish (!), as some deliberate conspiracy to
undermine the 'manliness' and 'military fitness' of the German
people ... It figured prominently in those conspiracy theories that
the Nazi leadership took so seriously.
They were regarded as flawed, and Germans believed in survival of the fittest.