Bicycle cables never break in tension. They always break from fatigue. No amount of inspection or maintenance will reveal when fatigue sets in so cables are therefore best replaced routinely. The nice plush feel of new cables make up for the cost and hassle of new inner and outer cables. Besides, it gives you an excuse for fresh bar tape. There is no need to carry spare cables if you regularly replace them. I've never broken a cable in living memory but I've replaced plenty of customer cables, particularly inside Shimano STIs where they break just behind the index barrel. A cable that breaks there requires hours of work to extract, another reason for replacing them often.
Cables don't break by work-hardening but by fatigue. They are already plenty hard from manufacturing - both tempering and work-hardening. Work hardening happens when the metal crystals can no longer slide (reasonably) freely over each other. Most metals have some "give" in the structure but after that's gone, the metal has hardened. In actual fact, it doesn't become harder, the yield point goes up, but that's another matter.
A cable that bends over a radius of say a one pound coin displays equal fatigue in all the strands. That's because the helical wind ensures that each strand gets its turn in being bent. The reason for a helical wind is so that no one strand elongates relative to the others when a cable goes around a bend. The end of the cable remains flush and there is no relative movement between strands provided the radius corresponds with the helix's frequency.
Clamps such as those in the photo shown by
@Globalti force that section of the cable to bend beyond the helix' s frequency and therefore forces internal movement between strands, in that section. It also bends the strands beyond their fatigue limit and brings about premature failure through fatigue. Many metals have a fatigue limit whereby as long as the metal is flexed below that limit, it can go on flexing practically forever - think car springs. However, once you exceed the parameters and flex it beyond that, the fatigue sets in and the metal breaks. I prefer break over snap since snap suggests exceeding the yield point, which is not what happens when cables or spokes break. Once one strand is broken on the cable, the others will follow very quickly because all strands fatigue at roughly the same rate.
The wind-up barrel inside STIs has to be kept small to keep the shifter compact and that radius is smaller than what the cable's fatigue limit allows. I guess that the cable nipple made of zinc is melted onto the cable and the heat affects the heat treatment in that zone also, reducing cable life. I would also suspect that quality cables will have some sort of preventative measure at point of manufacture. However, the fact that it breaks just beyond the nipple even though that section does not bend more than the others, make me think that breaks are due to manufacturing errors and/or processes.
Not all cables are the same. Cheap cables are generally course but most people don't appreciate the difference in feel so it is good enough for them.
Here's an example of some cables.
The cable below is Shimano, the one above that Jagwire. Note how the Shimano cable has been smoothed out by pulling it through a die after winding. The Jagwire retains its round wire shape which comes up quite course in a smoothness test and can certainly be felt, especially on the long rear brake cable.
A comparative smoothness test is simple. Take the various same-length cables (inners installed in their housing) you want to compare and wind them around a pole with a diameter of about 60mm - six or so times. Now simply manipulate the ends of each one and you'll discover an enormous difference. Campag and Shimano feels like butter, BBB, Jagwire and Clarke's like a saw blade on a piece of rebar.