

A non-aggression pact can be just that. This one also included additional provisions, such as dividing Poland between them. When you’re carving up Poland together and shaking hands at the pre-set dividing line, it’s not really reaching very far to say the two countries in question are aligned. They were certainly aligned when it came to dividing Poland.
Again, nobody is doubting that there was a reason for doing it.