This is unpleasant to think about, and worse to see, but it is nature’s way and it does not mean that your mice are ‘nasty’.
Mice will not kill each other in order to cannibalize – they only cannibalize a mouse which has died somehow.
It’s highly unlikely that they would go through the danger of a fight to the death just to get food – this is unheard of, even when mice are starving.
Usually the mouse died of natural causes, but occasionally one will die after fighting. Note that this doesn’t mean that the fighting occurred because one mouse wanted to eat the other; the mice would have been fighting for other reasons.
Try not to be too upset if one of your mice is cannibalized after it dies. Mice don’t share some human social rules on these matters – they just see an unwanted body, which can be a valuable source of nutrients for them.
They are just doing what comes naturally.