Although it has to do with timing and synchronization, it has nothing to do with clock synchronization. Ad insertion technology doesn’t care about wall clock time.
As explained upthread, those flashes of commercial are the result timing errors in the insertion of local ads. The local ads are meant to overlay the “micro commercials” which are actually short bits of a whole commercial carried in the network feed. From a long-ago post:
It’s a timing error, but not because of clock synchronization. You see this mostly on cable networks with local ad insertion. Cable head-ends are lights-out operations i.e. fully automated. The cable network uses signals in their satellite transmission to indicate where ads may be placed. Older systems used high-speed dual-tone multifrequency tone sequences (aka DTMF, like the sound when you press a phone button) in main, secondary, or side-band audio to signal that a break was coming up in a pre-determined number of seconds (usually around 8 seconds or so.) A machine in the cable head-end then plays out an ad at the appropriate time.
The eight second delay from the tone to the spot is to allow the automated tape deck to cue up the right ad. Needless to say, few if any cable companies use tape these days, but the system persists. With room for error in the insertion of the tone, its reception, and the selection and playback of the ad, the whole system isn’t really exact enough to allow insertion with precision any closer than a second or two. Hence, you often see some of the spot that’s being overlaid.
Eventually, the audio tones gave way to proprietary signaling mechanisms implemented by satellite receiver, or more precisely, integrated receiver decoder (IRD) manufacturers. The IRDs usually have both dry contact switches and audio outputs which control the ad insertion equipment directly or can be attached to the DTMF detectors to do so.
And finally, the most modern ad insertion system is based on a Society of Cable Telecommunication Engineers (SCTE) standard called SCTE 35. SCTE 35 has been adopted by most networks, but the cost of upgrading old equipment in thousands of cable head-ends has resulted in the continuing support of older systems as well.
SCTE 35 and few related standards that extend 35 allow frame-accurate insertion of digital audiovisual content in digital programming streams.