A site called io9 explains that brain freeze is an evolutionary tactic.
Blood rushing through the extremities cools down, and when it comes back to the body, it cools the rest of the system. The body has negotiate a way to keep blood flowing to the fingers, toes, and nose, while protecting itself.
....
Ice cream headaches don't usually happen in cold weather, but they are bound up with the body's response to it. When people eat ice cream, it chills the area around the head, and the blood vessels constrict. This constriction is painful - it's the same thing that causes intense and debilitating migraines.But fear not:
It doesn't do damage and lasts only a few minutes. Still, people don't like discomfort with their desserts, and they've found a few ways to avoid it. One is to, yes, eat more slowly.I always know it's &%$#@!ing cold out when I laugh and get brain freeze from the cold touching my teeth. It's about that temperature right now in New York. And speaking of laughing, you know what is really not funny? The whole Gaddafi family and how they are massacring their own citizens.