Natural selection. Females with longer necks could reach higher food whilst shorter-necked females had to compete with smaller land animals. The long-necked females were therefore able to get food to feed their offspring who would therefore more regularly survive to have their own offspring. Because of this, males who were attracted to long-necked females had more offspring and so the gene for attraction to long-necked females was passed down more readily.