As a result of their antisemitic ideology, following the invasion of Poland the Nazis developed ghettos to segregate and control Jews.
Historically, ghettos had been used to segregate Jewish communities from the rest of the population across Europe. The Nazi leadership, Wehrmacht soldiers, Einsatzgruppen , SS , SD and various local authorities across Poland built on and adapted this historic idea.
The Nazis also introduced ghettos due to their false theories that Jews spread diseases and therefore should be segregated to protect the rest of the population. This was in line with their racist and eugenic beliefs.