Headsets break when the bearing balls crush the hardened surface of the bearing races. This happens when the metal of the races is too soft or the headset is loose, so that the balls bump about and smash into the race during a bumpy ride. Since you hold the handlebars almost exactly straight during almost all of your ride, the balls hit the same spot over and over again. The risk is reduced if the bearing balls aren't actually spheres but little cylinders, which are also usually mounted at an angle, both of which spreads the impact energy.
You should frequently check whether your headset is adjusted properly. Stand behind the saddle, lean forward onto the saddle, engage the front brake with one hand, put the index finger of your other hand on the little gap where the top and bottom half of the top bearing join, and push hard against the brake. Your finger should not feel the gap shift at all. If there is the slightest movement you need to readjust it immediately.
If you lift the front wheel and turn the handlebars, and you feel a point of resistance where the fork appears to "snap" into the forward position, it's too late. The headset needs to be replaced. Since this is an expensive proposition, frequent checking is important. Don't ride with a broken headset, it makes it hard to ride in a straight line because the normal tiny handlebar movements become impossible.
See Also an article on "Adjustment & Repair"