You wonder how this near ideal shape could evolve.
Maybe a pair of opposing plates preceded this to better sync the legs, and the plates became wheels to allow longer hops. Then adding bumps to each wheel is imaginable since it would sync a bit better.
But a long series of identical deep evenly spaced detents along one wheel and a perfectly matched series of gear nubs on the opposing wheel is quite a bit more complex and a phylogeny that's not at all intuitive, to me anyway.