I suppose it could have to do with being all excited about the treat, and so worried that someone will steal it that they can't help but panic. But that's a really good question. How could fussing about a treat, and drawing the entire rest of the flock after you in hot pursuit, be a beneficial behavior trait?
One of my buff Brahma chicks begins shrieking if somebody else is in possession of something desirable and she's unable to claim it. It's a loud, piercing, rapid-fire series of chirps. I swear it's a chicken temper tantrum, as it only happens if another chick has thwarted her efforts to claim whatever is the latest and greatest thing in their little chickie minds. She is now referred to as the Drama Llama Brahma.
I will go out and watch the chick and all their ridiculous behavior..they don't care who they step on, smash, poop on, steal from, the smart thing would BE to just stand there and eat it..but instead of realizing what they have..they freak out worrying about who might see it...running around, hiding it from others.....which causes their problems..so much like human nature..it's scary.
Oddly enough many social animals do this to some degree. Some species are social feeders like a lot of parrots, to get a finicky parrot to try a new food you can eat it or pretend to eat it infront of the bird. It's also a common behavior in primates, sort of a code of ethics. There've been studies on this showing that monkeys that dont announce a food source are often repremanded within the group.
As to why chickens do it, it could be any of those, or perhaps a sort of assistance call if the food source is too large to gulp down a pack of wild eyed hungry chicks to help break it up might be just the thing needed to consume the treat. The running and screaming might just be part of it.
My daughter stops over almost every night to watch supper treat time. I can put down a whole plate of peas, grapes, or scrambled egg and they will all chase the first one to get a piece and start shreeking. Then they realize there's a whole pile and the riot begins. (5 week old silkies) It's like a horror movie, gone in 60 seconds.
I gave them a dozen crickets last week and they all jammed at the far end of the brooder screaming in terror. I felt bad and tried to catch the crickets to take them out. The bravest (or smartest) chick interpreted my picking motions correctly (dam slippery crickets) and approached to see what I had. It grabbed the cricket and did the food call and then they all pitched in. They were even catching them in mid hop. Too funny.