Cutting the work into more pipeline stages shortens each stage, so the clock ticks faster. But every stage adds a little latch overhead, and when a branch is mispredicted the whole pipeline has to refill, which costs more cycles the deeper it is. Time per instruction is the product of the two, and it has a sweet spot.