Great Britain and France declared war on Germany when Germany invaded Poland.
Why did they not do the same to the Soviet Union when the Soviet Union attacked Poland shortly after?
More can always be said, but this older answer might be of interest for you.