I've been playing 50 years and have broken 2 strings. Both times the same string (D IIRC, it was in the 70's), same brand, and within a few weeks of each other.
I was a much harder player then but still put it down to a bad batch of strings, I got the replacements from the same shop so they probably came out of the same batch.
Since breaking the first one I have always carried spare strings*, "better to have and not need than need and not have".
*And fuses, picks, ear plugs, leads, amp, soldering iron, strap, etc.