Lots of historical data goes into determining the flight times.
Yes, the Block to Block (gate to gate) time can vary significantly, based upon the time of day. Weather can't be predicted months in advance, but scheduled arrivals into a hub, and departures outbound, and projected gate utilization can.