It is not only about speed.
Direct flights can reduce handling and transit risk, but they may not always have the best departure time or available space. Transit services can be competitive when routing is stable and the connection window is reasonable.