Once you are attacked by a player, you are forever considered to be 'in a fight' with that player until you do eventually do die due to some cause.
For example, you have died by brushing up against a cactus, but since your friend accidentally hit you with a mallet five minutes earlier, the death message is
"Player X walked into a cactus whilst trying to escape Y."
This is just incorrect, more times than not.
Steps to reproduce:
1. Have a friend punch you once. (or a have a mob attack you.)
2. Wait for at least a minute.
3. Jump off a cliff, fall in lava, drown, or just /kill yourself.
4. To the rest of the server, it will appear is if your friend (or that mob) caused your death.