The simple but essential point is that the double diagonal path that we see the photon traverse is longer than the straight up-and-down path taken by the photon in the stationary clock; in addition to traversing the up-and-down distance, the photon in the sliding clock must also travel to the right, from our perspective. Moreover, the constancy of the speed of light tells us that the sliding clock's photon travels at exactly the same speed as the stationary clock's photon. But since it must travel farther to achieve one tick it will tick less frequently. This simple argument establishes that the moving light clock, from our perspective, ticks more slowly than the stationary light clock. And since we have agreed that the number of ticks directly reflects how much time has passed, we see that the passage of time has slowed down for the moving clock.
You might wonder whether this merely reflects some special feature of light clocks and would not apply to grandfather clocks or Rolex watches. Would time as measured by these more familiar clocks also slow down? The answer is a resounding yes, as can be seen by an application of the principle of relativity. Let's attach a Rolex watch to the top of each one of the light clocks, and rerun the preceding experiment. As discussed, a stationary light clock and its attached Rolex measure identical time durations, with a billion ticks on the light clock occurring for every one second of elapsed time on the Rolex. But what about the moving light clock and the attached Rolex? Does the rate of ticking on the moving Rolex slow down so that it stays synchronized with the light clock to which it is attached? Well, to make the point most forcefully, imagine that the light clock-Rolex watch combination is moving because it is bolted to the floor of a windowless train compartment gliding along perfectly straight and smooth tracks at constant speed. By the principle of relativity, there is no way for an observer on this train to detect any influence of the train's motion. But if the light clock and the Rolex were to fall out of synchronization, this would be a noticeable influence indeed. And so the moving light clock and its attached Rolex must still measure equal time durations; the Rolex must slow down in exactly the same way that the light clock does. Regardless of brand, type, or construction, clocks that are moving relative to one another record the passage of time at different rates.