~10 years, every 3 to 6 months. Longest is 9 months. Shortest is 3 weeks.
The cable starts to fail underneath the strain relief boot. It unwinds, individual strands of copper start to break, and it shorts out. The play/pause (or ending a call) is the cable shorting causing the phone to interpret that command.
It happens most to people who walk with a device in their front pocket while listening to music. This accelerates the rate of failure of the cable underneath the strain relief boot.
I even brought it up at WWDC. Twice. Still the same boot after a decade. My AirPods show up in 4-5 weeks.