I had a mare that was a dream to handle, she was an amazing horse, anybody could do anything with her. She taught dozens of kids to ride, she was calm, respectful, never put a foot out of line. The vet could show up, look her all over, touch her all over, stick her arm down either end if she wanted, but as soon as the needles came out, it was as if someone flipped a switch. It was honestly Jekyl and Hyde. After quite a few battles, and only specifically over shots or blood draws, the vet and I discovered that if she simply walked alongside us as we were walking around the arena, and gave the shots or drew blood in transit, the mare was fine. Luckily I had a great vet that was willing to collaborate with me, instead of insisting on a twitch or a chain. In this mare's case, it was honest terror of the needle. But often it IS a handling issue. The mare also had a set of scars on her butt that made her look like frankenstien, which she had before we got her. It was obviously a "home repair job", as the scars from the stitches looked like a railroad track. I often wonder if she was stitched up without sedative and that set up her terror of needles. She also had to have colic surgery when she was older, she gave a vet student a concussion because they didn't believe us when we told them beware of her around needles, the student got slammed into the stocks as she was trying to administer a shot. They told us the same thing. Even in severe pain (our vet had sedated her prior to going to the vet school) she was as compliant as any horse they had ever seen, until that needle came out.
My point is, yes, most of the time it is a hole in training, but sometimes there is an exception that makes the rule, and a little thinking outside the box can go a long way.
"Keep a leg on each side and your mind in the middle"