Because Adolf Hitler used the Jews as a scapegoat for post-WW1 financial troubles and used phrases like "Bolsheviks" and "Marxism" to convince right leaning German citizens that the Jews were not only the cause of their problems but actively working to destroy their way of life.
This instilled a belief system in the fundamentalist "patriots" that it was up to them in order to fix the issues by standing against the Jewish population, this lead to events like Kristallnacht where businesses and homes were violated and destroyed in an attempt to make Jews fear for their lives.
Eventually when the Nazis started rounding up the Jews, not only were most of their neighbors okay with it happening, it wasn't uncommon for them to assist in reporting and turning them in.
So you could say social engineering and propaganda over the course of years were the primary reason why the holocaust occurred, as it would face too much push back from an unprimed group that hasnt been molded over time to assess said group as "the enemy."