Prove no contraction in the orthogonal directions
Thought experiment:
Two rings are flying toward each other at relativistic speed. The rings are perpendicular to the velocity, flat toward each other, and have very thin paper stretched across like a drum head.
Now imagine the high speed makes transverse measures smaller. Ring A sees a tiny ring B coming toward it: B punches a tiny hole in A, in the process being obliterated. But B sees A tiny, and sees A punching just a tiny hole in B.
That’s a contradiction: two different results of the same space-time events doesn’t happen.
Ditto if transverse measures get longer.
For longitudinal measures, simultaneity creates consistency between separate points. But here we see inconsistency at the same space-time point.
Must be that neither happens, because transverse measures don’t change, and the rings exactly hit each other.
If you think about this question in terms of the matrix elements of the Lorentz transformation $\Lambda$, for a boost in the $x$ direction, there are really two separate questions.
(1) First there is the question of why we can't have $\Lambda_{yt}\ne0$. This would violate symmetry under parity or time reversal.
(2) Next there is the question of why we must have $\Lambda_{yy}=1$. There are various arguments that can be constructed:
Rings or cylinders passing through each other. This is described in Bob Jacobsen's answer.
The "nails on rulers" argument. Suppose that two observers, in motion relative to one another along the $x$ axis, each carry a stick oriented along the $y$ axis, such that the butts of the sticks coincide at some time. Due to the vanishing of the types of terms in the transformation referred to in (1) above, the sticks are collinear at this time. Therefore these observers must agree whether the sticks are equal in length or, if not, then on whose is longer. But if the sticks are unequal, then this would violate the isotropy of space, since it would distinguish +$x$ from −$x$.
Arguments from conservation of spacetime volume. Under a Lorentz transformation, one can prove from symmetry arguments that area in the $(t,x)$ plane is preserved. The same proof applies to volume in the spaces $(t, x, y) $ and $(t, x, z)$, hence lengths in the $y$ and $z$ directions are preserved.