How does the principle of relativity imply that photon clocks and mechanical clocks experience time dilation the same way? Context for this question: There is a famous thought experiment used to explain time dilation that uses two mirrors and a photon to set up a clock. The two mirrors are placed parallel to one another, and a photon is sent travelling perpendicular to the planes of the mirror, bouncing back and forth. Each time the photon hits a mirror, the clock ticks. When it is viewed by an observer travelling at relative velocity perependicular to the direction of the photon, the mirror-clock ticks more slowly due to the apparent zigzagging motion of the light. I started wondering why this is true in general, and not merely a feature of this particular type of clock. I found this earlier question which asked just that. This question is a follow-up to the answer provided by robphy on that post.
Robphy states that all clocks must experience the same phenomenon by invoking the principle of relativity:

An inertial observer carries both a light clock and a mechanical wristwatch, which agree when all are at rest. If they don't agree when the inertial observer is moving [with nonzero constant velocity] carrying these clocks, then that observer can distinguish being at rest from traveling with nonzero constant velocity.

I don't understand this answer. Why wouldn't the two clocks agree agree? If the inertial observer is moving with nonzero constant velocity carrying the clocks, wouldn't the situation be identical to the observer being in the rest frame for both clocks? So why would the clocks have different measurements at all?
 A: 
Observer A has a [synchronized] mechanical and light clock, and Observer B has a [synchronized] mechanical and light clock [...] Why couldn't Observer B see Observer A's mechanical clock to be synchronized with his mechanical clock, but their light clocks out of sync?

Physical theories aren't that subjective.
You could imagine that one of A's clocks is wired to a bomb that explodes after a certain number of ticks, and A's other clock is wired to a robot that, after a certain number of ticks, cuts the wires and prevents the bomb from going off. For particular values of parameters of your thought-experiment, you'd be forced to conclude that the bomb goes off for A and not for B, or vice versa.
There are a lot of books that claim that different observers "disagree" about properties of the world, but those disagreements are extremely shallow: it's like people who have chosen different Cartesian coordinate systems disagreeing about the coordinates of points on the plane. Clocks are like lines in the Euclidean plane with tick marks on them, and synchronization of A's clocks is like the tick marks of parallel, nearby lines matching up. They can match or not match, but not both.
A: You raise the question:

Why should the fact that the clocks agree in any rest frame mean that they should also agree in a frame moving at some velocity?

If the principle of relativity of inertial motion holds good (with the members of the equivalence class of inertial coordinate system being related by Lorentz transformation) then all forms of time-keeping must respond in the same way to a Lorentz boost.
Conversely, if there would be a difference then there would be only one coordinate system with the characteristic that clocks that are co-moving with that particular coordinate system will all record the same amount of proper time elapsing. When co-moving with any other coordinate system there would be a difference. That would allow observers to identify that one unique coordinate system. Such an outcome is not compatible with the principle of relativity of inertial motion.
So if one grants the supposition of relativity of inertial motion it follows that all forms of time-keeping must agree with each other
A: Underlying the question seems to be the assumption that time dilation is something that affects clocks, which therefore raises the question of whether it affects all clocks in the same way. That is quite the wrong way to consider time dilation- it is not something that 'affects' clocks, it is a property of the geometry of spacetime which causes the elapsed time between events to be frame dependent.
For example, the interval between two events in one frame might be 4 seconds while the interval between the same events in another frame is 5 seconds. Accurate clocks, of any sort, will correctly record the interval as 4s in the first frame and as 5s in the second- that is  because the intervals are different, it is not because clocks in the first frame are 'affected' somehow in a way that causes them to under-report the time.
The principle of relativity says that the speed of light is the same in any reference frame. It follows that the elapsed time between two events differs between two frames- the difference doesn't depend on what sort of clock you use to measure it.
A: You seem to think that Robphy uses the principle of relativity as a kind of self-evident universal truth (like 1+1=2), which you could come up by yourself if you think hard enough. He then seems to deduce something even more obvious from it (equivalence of light clocks and everyday clocks). But you believe in neither truth and ask us how Robphy came to think that way.
The problem is that the principle of relativity is not something trivial like some axioms of math, but it is a law of nature that has been repeatedly confirmed by observation. We could well have lived in a different world, where it were possible to distinguish between absolute rest and motion. One possibility for such a distinction would be if light and everyday clocks went different when moving at various velocities.
But even if all clocks always go synchronously in all systems, that is not a "proof" of the principle of relativity. The principle of relativity tells us that there have never been found any experiments whatsoever (either with clocks or anything else), that allow us to distinguish between absolute rest and movement. Possibly, we have not searched hard enough and in 500 years from now we could find such an experiment, but at the moment that is the state of affairs (and to be sure, broad consensus is that it is pretty unlikely that special relativity will ever be broken). In that sense, finding such clocks or conditions would invalidate the principle of relativity, because the principle of relativity specifically says that there are no such clocks.
So we can't answer your question "why", we can only confirm that none of us knows any way to distinguish between absolute rest and motion, of which differently going clocks depending on velocity would be one example. In the same sense, I don't know of anybody who can cancel gravitation. That doesn't mean that anti-gravitation doesn't exist, nor does it automatically imply that we just have to search hard enough to find anti-gravitation.
A: He is using an argument ad absurdum. His conclusion is that photon clocks are identical in function to all other clocks, and his evidence is that the two clocks in question do agree regardless of which reference frame they're in.  The clock do have the same measurements.
A: 
Why wouldn't the two clocks agree agree?

The argument does not say that there are any circumstances under which they would not agree.  In fact, that's the point.  It says that it would be inconsistent with the principle of relativity for the two clocks to keep different time, so if we accept the PoR, then we must also accept that the clocks will keep the same time.  That's the whole argument.

If the inertial observer is
moving with nonzero constant velocity carrying the clocks, wouldn't
the situation be identical to the observer being in the rest frame for
both clocks?

Would it? That follows from the PoR, at least. I accept the PoR, so I accept that claim, too.  On what basis do you accept it?

So why would the clocks have different measurements at
all?

To the extent that we accept the PoR, we must conclude that they would not have different measurements.  This is what was to be proven. We cannot accept that the clocks might keep time differently without rejecting the PoR. If we actually observed such a difference then that would directly refute the PoR.
Moreover, it does not matter whether there are any alternative arguments for the clocks keeping the same time that do not depend on the PoR.  If we accepted that the clocks might not keep the same time then we would need to reject all arguments to the contrary as being based on false premises or being otherwise fallacious.
A: OP's concern is understandable. The usual time dilation derivation is done with a light clock, with beams moving vertically in one frame and diagonally in another, so why should the same equation apply to a mechanical clock sitting on a table? This can be shown using the Lorentz Transformation, which is derived independently of the light clock thought experiment. Consider the usual notation for observers O and O' with coordinates (x,t) and (x',t'), with the O' frame moving with relative velocity v with respect to the O frame and we'll use the inverse transformation to calculate time intervals in the O frame.
So suppose the O' mechanical clock is sitting on a table at position x' and consider a time interval between two readings $t_2$'- $t_1$' which corresponds to the two events (x',$t_1$') and (x',$t_2$'). We have
$t_2$ = $\gamma$($t_2$'+vx'/$c^2$)
$t_1$ = $\gamma$($t_1$'+vx'/$c^2$)
Thus, $t_2$ - $t_1$ = $\gamma$($t_2$'-$t_1$') so the time dilation equation applies to any time interval in the O' frame, whether measured with a light or mechanical clock.
A: The questioner is asking what similar analysis could be applied to say, a windup clock, that explains why is runs relatively slower with respect to a stationary clock in a way that the photon clock has a "physical" explanation of why it runs slower.  The simple answer is that light is fundamentally different than other "clocks".  A postulate of relativity is the speed of light in a vacuum is the same for all observers. This allows two observers to compare the lengths of travel of the photon and conclude that there is apparent time dilation.  If the photon were replaced by say, a harmonic spring, like a mass suspended vertically between two springs, two people in different reference frames could measure the relative lengths of the path of the moving mass on a moving train and conclude there must be an enourmous time dilation.  Another way of looking at it is that the photon clock thought experiment does not "explain" why the photon clock runs slower.  It only demonstrates how relativity is consistant with the assumption that the speed of light is the same for all observers. There is no physical explanation for why physical clocks run slower, they just do, for if there was an explanation, it would be possible to determine that they were moving and hence that would break another postulate of relativity.
A: Suppose that two observers moving at different velocities each have:

*

*A photon clock.

*A mechanical clock.

*A device that checks both clocks, displays the time if they match, and displays "Error" if they do not match.

Each observer has synchronized their own two clocks, and sees the third device displaying the time, never displaying "Error".
That the devices never display "Error" is a physical fact of reality, independent of reference frame, so all reference frames must necessarily agree that the inputs that determine the output have values that never produce "Error".
The thought experiment in this question's context shows that an axiom of relativity (the speed of light is the same in all reference frames) implies that a photon clock's measurement of time passing depends on reference frame. This extension of it, with a mechanical clock synchronized to the photon clock and a device that compares them, shows that whatever phenomenon causes the difference in measured time must necessarily affect all clocks equally, because otherwise different reference frames would have an irreconcilable difference in the resulting effects.
This thought experiment does not show why or how a moving mechanical clock remains in sync with a moving photon clock. It also does not explain what causes a moving mechanical clock to remain in sync. It only shows that, somehow, it must be true that the mechanical clock does remain in sync - that some phenomenon causing continued synchronization must exist.
A: Lets reword that answer you quoted, and add some extra details, and see if it helps.
Some background
The laws of motion in this universe seem to be that you cannot tell if you are moving at one constant velocity or another. If you were stationary, or moving at 100 m/s, there is no experiment we know of, no way you can tell, which it is. You can only say you are stationary compared to some other thing, or moving at 100 m/s when you measure your velocity compared to some other thing.
That's an observational finding, but one that's never yet failed however hard we test it, so it seems to be true.
Special relativity says that whatever your own velocity might be, if you measure the speed of light, you will always find it's the same value. So this is not very intuitive. Bob is moving 100,000,000 m/s (100,000 km/s) faster than you, but both of you measure light as moving at the same speed.
Again, this is an observational finding that we have tested, and again, it's never failed however hard we test it, so we think this is true as well.
BUT...
How on earth could these findings both be true? Special Relativity is our theory how they can both be true.  We believe the answer is, that space and time themselves have a geometry that makes it so. You might not know when you are at rest or when some other object is, but when you travel at different velocities, and if you measure everything you can, whether you move, start, stop, or anything else, you will both measure space and time differently.
You'll disagree about how far each went, how long each took. It doesn't matter if you measure it with a laser, an atomic clock, or any other devices able to measure time and distance, because every single thing that can measure space or time, will have been affected the same way.
In a way, suppose you could tell the difference and any device wasn't affected that way. Then one or the other of our observational findings would have to be wrong, because you could use that device to overturn it.  Since we don't think our findings are wrong, we don't think any device will be capable of being unaffected by Relativity.
Same answer as quoted, written a different way:
Suppose you travelled in a spaceship at constant velocity (you are an "inertial observer"). In fact, suppose that there is some special velocity that you think is "at rest".  So you have done your best to be stationary compared to space and time itself.
You have a clock that measures space and time using light, and one that measure space and time using mechanical movements. The clocks both agree perfectly about the time, while you are in the spaceship.
Suppose you now put on a spacesuit and move away from your spaceship. You now have nonzero velocity, if the spaceship has zero velocity.
Now I hide the spaceship, and ask if you are at rest or moving compared to space and time. You look at both clocks.
Suppose both clocks have stopped agreeing. That would mean you can scientifically test if you are at rest. Have these 2 clocks, and keep changing velocity. When the two clocks tell time at the exact same rate, you're at rest.
Bit observationally, we just don't think that will ever happen. We find that any clocks moving together,  always seem to keep the same time.
So the idea will fail. You can't tell if you are at rest or not, because anything you carry to measure space or time, will be affected the same way, whether its a photon clock or a stopwatch
And that means your observer can't ever distinguish being at some kind of "rest", from traveling with nonzero constant velocity. There's no measurement they can do, or any kind of clock they can carry, that will distinguish your "actual absolute" speed, or tell you when you are at absolute rest. Because that doesn't exist. There is no magical "at rest" velocity in our universe.
