Some people are just more headache prone.
I started getting really bad migraine headaches when I was in 2nd grade, &, for whatever reason, I was always too scared to tell my parents that my head was hurting. So I would wait until it was just unbearable, &, inevitably, throw up.
I still get migraines - mine now tend to be hormonal, but different foods can also trigger a migraine.
I also get headaches from being in the sun too long (especially at the first of the spring/summer after it gets hot for the first time), from being around cigarette smoke, from being around strong perfume-y scents, from eating anything w/ MSG, from eating too much carbs & not enough protein, from not eating (especially breakfast/lunch), from stress, from sleeping too long, from not sleeping enough, weather changes, etc.
Being in the car too long can also sometimes trigger a headache - depending on other factors like what I've had to eat, if the sun is glaring into the car, how long I've been in the car, etc.
There is a hereditary component. My dad & my aunt (my dad's sister) both have really bad migraines. My dad's are more controlled now, but he used to get really bad cluster migraines.
Both of our teenagers get headaches periodically - they'll take Tylenol or Advil or Aleve. We've never specifically consulted a doctor about their headaches, because, otherwise, they're healthy & their headaches typically respond to the OTC meds. DD tends to get headaches if she's not drinking enough water.
Drinking a Coke w/ whatever med can be beneficial. I don't typically drink any soft drinks, but, if I have a bad headache, I'll take the medication & drink a Coke along w/ it. My DH read an article about Gatorade & headaches, so I'll also drink a Gatorade when I have a headache.
Hot showers also help. When I have a bad headache, I'll sometimes be in & out of the shower until it's finally gone.
Like others have said, the doctor might have your DD keep a headache diary. It might also be a good idea to keep track of what she's eating, since many times headaches can be triggered by certain foods. My 10 year old niece gets migraines from red dye.