LZW compression looks for sequences of identical pixels appearing in sequence. GIF images are saved as horizontal rows; hence a GIF with horizonal uniformity will compress better than one without.
The following example says it all:
GIF image: 126 bytes
same image, rotated 90°: 205 bytes