I think we can 'kinda' understand it just by thinking how it works but yes there's a mathematical explanation too
Synchronization of Metronomes
fireflies syncing up their flashing is another example of this phenomenon
Synchronization of Metronomes
As one metronome's pendulum bob moves to the right, this pushes the base to the left (because of momentum conservation). The base moving to the left then pushes the other metronome's pendulum bob to the right---i.e. in the same direction as the first pendulum. Thus the slightly faster pendulum gives a kick (through the base) to the slower metronome causing the slower pendulum to speed up.
fireflies syncing up their flashing is another example of this phenomenon