None of the causes of inversion mentioned on Wikipedia seem to apply: there is no strong negation like never, nor a strong limiting adverb like so and only in first position.
We can only be sure after some historical research. But, after some reflection, I think the most likely explanation is that it echoes an hypothetical question. I imagine it came about like this:
- Hector: Achilleus, you are a worthless warrior.
- Achilleus: I am a worthless warrior? How dare you! Die!
In an indignant reply, the original statement may be echoed as a rhetorical question, but without inversion. Notice that the perspective changes as would be expected: you changes into I.
- Achilleus: Hector, can you win this war, you think? Come on, just give up.
- Hector: Can we win this war? Of course we can, and we shall! You have no idea how powerful Aphrodite is, our protector-goddess.
The question is echoed as a half-question, half-exclamation. In casual writing,
!? could be used.
- Telemachus: Did you fight any Trojans? Have you got a story for me?
- Odysseus: Boy, have I got a little story for you. It was a huge spectacle of attack and retreat, honour and cowardice. Let me begin...
When this rhetorical question is used in a casual manner, in a well-known formula (cf. how do you do), it may lose some force and be pronounced and punctuated as a statement instead of a question. The remaining rhetorical force is expressed by the inversion: have I got a little story for you is stronger than I have got a little story for you, in that the story is suggested to be more remarkable.