There's nothing haphazard about molting, especially when it comes to birds. In most species, the replacement of feathers is both predictable and precise. Were it not so, these same birds would lose their balance in flight or, more likely, be forced to travel on foot.
Evidence of this "smart" molting is plentiful now. Just look at a soaring hawk or crow. Notice the notches in its tail and at the edges of its wings. Notice, too, that the notches are symmetrical; if a feather on the right wing is missing, its counterpart on the left wing will also be missing.
This molting occurs centrifugally, meaning that it starts with the innermost pair of feathers, those closest to the bird's torso, and proceeds over the course of several weeks, one pair of feathers at a time, to the feathers at the tips of the wings. Thus the bird is never without more than a few of its most important feathers, never unbalanced, and never forced to hitchhike.
Click here for an up-close picture of a hawk with notched feathers.