Well, Russia was attacking Poland as a sort of tradition since forever. Well before it became Soviet.
But Soviets specifically had a reason. 20 years before WW2 they tried to "bring their revolution" West with force and they got their asses kicked properly in the main battle near Warsaw.
This was named "Miracle on the Vistula", because as it often happens with Russia they had numbers of people that should make it hopeless for the Polish.
Prior to that, not Soviet, but Tzarist Russia occupied Poland for over a hundred years splitting the country between itself, Germany and Austro-Hungarian empire. That was their "ideal state" and what they were trying to come back to with Ribbentrop Molotov pact.
In general they have invaded many times in history. Polish took part in an invasion of Russia only once. It wasn't even proper Polish army supported by the state/king, but few thousand mercenaries that contained Lithuanians, Cossacs and others that managed to take over Moscow and set up their own Tzar.
They were thrown out 2 years later. The Tzar was hanged, quartered and shot out from 4 cannons in 4 directions. You can imagine they didn't like the guy. I think the date those mercenaries were thrown out (4th November) is a national holiday in Russia despite happening 400+ years ago.
TLDR/ Russia thinks it's an empire and smaller countries like Poland should be it's pawns. Polish never liked the idea. The end.