It's an expression of rage or frustration. It doesn't always mean that the person is looking for a fight. It might just be a gesture to affirm how serious the person is in his declaration. For example, Scarlett O'Hara shook her fist heavenward when she declared "As God is my witness, as God is my witness they're not going to lick me. I'm going to live through this and when it's all over, I'll never be hungry again. No, nor any of my folk. If I have to lie, steal, cheat or kill. As God is my witness, I'll never be hungry again."