Sometimes you have to stop asking yourself why things are happening or why she is doing something and just go with what works.
At 7 years old, explaining things and always trying to prepare her is actually adding to the stress. She doesn't care why she needs a shot. She only cares that it hurts. Many kids do better if you wait until the nurse has the needle and then say, "Oh, it's time for your flu shot," and then just give it to her right away ... no time for her to become anxious.
I used to think it was horrible when parents said, "Because I said so," or didn't take the time to explain to their child why they needed to do something. That's simply not always age appropriate. At 7 years old, it's just too much. It's overwhelming. Sometimes, "Because I said so," is a very important reason, because they need to learn (and trust) that their parents are in charge and taking care of them.
Focus less on explaining the doctor's visit to her. Instead, remind her that it's time to go to the doctor and that her job is to be polite and cooperate and then give her praises along the way. "Thank you for being patient while we waited to be called in. We have to wait for our turn, and sometimes that takes awhile." "Good job standing nice and tall for the nurse to measure your height." "That blood pressure cuff is kind of tight, but you weren't scared at all!" Build her up as much as you can, and she will start to relax and be less nervous. But if you tell her everything ahead of time, she's just going to sit there and let her anxiety build and build and build until she reaches a breaking point.
Honestly, why is she doing this? Because she's 7. Her behavior is very normal. You might not always be able to relate to her feelings, but that doesn't make them any less valid. Focus on helping her learn how to cope and how to respond, rather than trying to talk her out of them.