The winds of our earthly atmosphere have been known to move in mysterious ways ... The Jet Streams are in different places each day and sometimes each hour. In the same way that sailing ships would take a slightly longer route in order to have the winds 'in the right quarter' so with the ships of the air.
There is a calculation between having a tail wind on a longer route an a head wind on a shorter one.