They were able to break the German Army Command code because of Polish espionage efforts that culminated in the code breaking.
As a percentage, Poland lost the most of its population in the war, of any state.
They lost 25% of their people.
Also, the Poles stopped the invading Muslim Ottoman hordes at “The Gates of Vienna”. https://warfarehistorynetwork.com/daily/the-1683-battle-of-vienna-islam-at-viennas-gates/
They had the experience of 1920 when they did the same to attacking Soviet troops. Since that time Stalin had a grudge against Poland.