Holocaust happened because Hitler and the Nazis were racist. They
believed the German people were a 'master race', who were superior
to others. They even created a league table of 'races' with the Aryans
at the top and with Jews, Gypsies and black people at the bottom.
These 'inferior' people were seen as a threat to the purity and strength
of the German nation.