When I first got my mare she "tested" me to see how much she could push me around, she turned around while I was picking out her front hoof and bit me in the tush!!! Well I whirled around and bit her back...index and middle finger, jabbed into her neck. That surprised the crap out of her, and she has NEVER tried that again (I've had her now 3 1/2 years).
It's completely a respect thing if you're not doing anything to cause the horse pain and they try to bite you anyway. If you let it happen, it will just continue and will probably escalate too into other bad habits.
"The times when you have seen only one set of footprints in the sand, is when I carried you..."