I'm not sure i fully understood the situation from the wiki page. It seems the Soviet union wanted to invade Poland and place their military there from the start but the allies didn't support that. So they had a treaty with Nazi Germany.
Anyway, i'm confused and i'd like to do further readings on this and cover any possible blindspots/bias i have. Any explanation welcome.
Joey Steel had good input regarding eastern Poland/western soviet territory and that the land the Soviets took from Poland had only been in that country's possession for like 15 years. The Curzon Line
Should note the reason Poland grabbed it in 1918 when it got independence from Austria-Hungary and Russia was because it was territory Poland had historically had as part of the polish Lithuanian commonwealth before being partitioned between Austria-Hungary and the Russian Empire in 1797 (it's more complicated than that because of the partitioning and tributary states made in the aftermath of the Napoleonic wars and the multiple rebellions against the Tsar by that tributary in the 1830s and 60s but that's the gist).