Knowing nothing of the situation or whoever was involved, I will say that second dead snake in the photos looks extremely emaciated, and the cannibal also looks at least thin. Starved, stressed animals will act in ways that healthy animals may not. Once the cannibal wrapped the rival snake, it may have eaten it out of instinct.
That said, don't cohabitate snakes. There is a small chance of cannibalism if you cohabit snakes, but a nearly 100% chance it will not happen if they aren't in the same cage, after all.