I think the reason why we vocalize pain is out of shock and maybe to even try to get rid of pain. Going back to what The Habit Doctor said, I also agree that it could be a way to ask for help or to tell people that something is wrong. When someone gets hurt pretty bad, I think they vocalize it as a way to let go of the pain they feel, if that makes sense. You want a distraction from it and one way to do that is the scream. It's like screaming out of frustration, you do it to let your frustration out, its kind of like a coping technique in a way. So maybe vocalizing pain is a way to cope with the pain?
I do wrestling and that involves a lot of yelling and screaming, when you hear it, its either out of pain or a way to get more strength in a way. A lot of times when you do injure something in wrestling, you don't feel it till after the match is over. When I tore my Ac joint in my left shoulder, I didn't feel it till after the match was over.