Answer :

Probably all the western world had to do was to stand up against rising militarization of Germany during the rulling of Adolf Hitler and stop with policy of appeasement, represented especially by British Prime Minister Neville Chamberlain. He believed that the West needs to do everything to prevent another total war from happening and so he thought that if western world will give up to Hitlers demands (that included for example Anschluss of Austria and Sudetenland both of which were taken by Nazis in 1938). Unfortunately, as we know from history, that kind of soft policy only encouraged Hitler, which ultimately led to invasion of Poland in 1939.
Mostly because Hitler came into power. One of the way is that Germany should have stayed OUT OF POLAND!!! So much fighting was going on and so that made it even worse!