Sorry for posting late!
Anyway, I think it's because between when you have below 0 health and defeat, you still have a chance at victory if you manage to deal enough damage to beat him.
I've considered whether or not I should take it out, since while it is a bug, it does fit a sort of "desperate final attack before you fall".
I've also considered playing into it, setting the character's health to 1 if they manage to win before they fall so it feels a bit less weird.
Let me know if there's anything else you want to comment on.