Was it a rooster? I had a rooster that was extremely protective of his women and one day I went in the coop to check feed and he usually stays outside in the run when I do this, but he came in, and flogged the piss outta me! I had over 15 bruises on my legs!
That chicken could just be protective or maybe felt scared and just reacted!!!