Above all, it fosters the habit of writing every single day, the closest thing to a universally prescribed strategy for eventually producing a book. NaNoWriMo spurs aspiring authors to conquer their inner critics and blow past blocks. Only by producing really, really bad first drafts can many writers move on to the practice that results in decent work: revision.
Writers are, in fact, hellishly persistent; they will go on writing despite overwhelming evidence of public indifference and (in many cases) of their own lack of ability or anything especially interesting to say. Writers have a reputation for being tormented by their lot, probably because they're always moaning so loudly about how hard it is, but it's the readers who are fragile, a truly endangered species.