The whole concept of ghetto predates both Nazi oppression and the very existance of modern Poland. (For the bulk of the 19th Century, and into the early part of the 20th, there was no such state as Poland).
Beginning in the so-called 'dark ages' and spread throughout Europe ghettos were, often, the only place that Jews could legally live as Jews. Jews living outside the ghettos were... 'invited'... to convert or to move to the ghettos.
As Germany (and the Soviet Union) occupied modern Poland the Nazis mandated Jewish internment in the ghettos, and later the camps.