Nomingia gobiensis, shown with feathers
Thomas P. Hop and Mark J. Orsen of Protein Research Laboratories Inc of Seattle, Washington have theorized that dinosaurs that mutated to produce large feathers were better able to protect their eggs from heat and cold. This is well demonstrated by the above illustrations showing the difference in the amount of protection provided by a parent with no feathers and one with lots of them. This led to feather dinosaurs having a higher survival rate and far more descendents - a classic case of "survival of the fittest." Flight may have been a byproduct of this new characteristic.
From Dinosaur World @