u/PaiosFranen - originally from r/GenZhou
First of all, the USSR didnt divide up anything. If you actually read the Secret Protocol of the pact, youll realize the division wasnt in territories to invade, but in spheres of INFLUENCE. What does this mean? It means that, for example, Romania, which was in the soviet sphere of influence, could not have been invaded by or allied with Nazi Germany without Germany breaking the pact and thus declaring war on the USSR. The pacts objective was to create a wall of neutral buffer states between the USSR and Nazi Germany, in order to delay the war as much as possible, since the USSR wasnt ready to fight Hitler. In fact, if you read the communications between Molotov and Ribbentrop, its clear the USSR didnt want to occupy their part of Poland (which btw were soviet lands stolen by Poland during the Civil War), but keep a rump Polish state there as a buffer state.
However, what happened is the polish government escaped to Romania, and from there to the UK. The problem is that Romania was neutral, and thus, it couldnt allow the polish government, which was at war with Nazi Germany, to stay or pass through their country without them declaring war on Germany too. So the only way they could let the poles in their country was by interning them, meaning that they werent a government anymore. Thus, legally speaking, the Polish State had ceased to exist. And since the Secret Protocol of the Molotov Ribbentrop Pact referred to Poland as "the Polish State", not "the Polish lands", this part of the pact was now invalid. And so the USSR had no choice but to occupy eastern Poland, since the alternative was to just let Nazi Germany occupy it and march right up to the Soviet border, which they could legally do without breaking the pact.
The whole thing was a legal mess, caused by the polish government cowardly fleeing and leaving their troops and people behind. If you want to read more on this i recommend the book "Blood Lies" by Grover Furr, which debunks many antiStalin myths including the Molotov Ribbentrop Pact.