The reason Hitler invaded Poland -- to prevent genocide.
Forbidden history fact of the day:
Germany invaded Danzig, Poland in 1939 because they were intentionally forced to do so, in order to save the ethnic Germans still living there from being slaughtered by the Bolsheviks (β‘οΈ) in the most horrific ways imaginable. (Raping German women then chopping their breasts off, nailing children to barn doors, all the classics from the Bolshevik Revolution/Holodomor)
Between August 10, 1939 and September 6, 1939, the Bolsheviks killed 56,000 German Nationals in the Danzig corridor.
Hitler had already done "the right thing" by protesting in writing to the League of Nations (literally dozens of times), to no avail.
He and the Germans were left with no choice but to go in and stop the massacres and persecutions on Danzig's ethnic Germans themselves.
TLDR: After WW1 and the Treaty of Versailles, Germany was split into two with Poland in between. Atrocities were happening in that small German area, so after numerous attempts to find a political solution, the National Socialists said "Fuck it" and went in to save their people with force.