This is probably a key factor actually, because they seem to have an instinct about it that's more than a product of current conditions. Cannibalism as a stress reaction to confinement makes sense for actual confinement and actual stress, but "confinement" here is a stretchy term. Some people seem to think chickens are entitled to complete and total freedom, and any restriction on that freedom counts as confinement, which is too extreme. Pet dogs who live indoors in houses/apartments and only go outside for walks experience more confinement than chickens who have all day access to a spacious run, or better yet, chickens that free range on acres, and yet those free ranging, well fed chickens are still more likely to cannibalize their own for no good reason than the sight of blood, than the pet dog will ever be. So the confinement argument only goes so far. The cockfighting ancestry makes a lot more sense. And it would make sense that it's still showing up to this day, if nobody has explicitly bed against it, because chickens don't pose a real threat to humans, so who cares. As opposed to dogs, where the aggressive ones either get put down, or dumped, or not allowed to breed etc. and eventually such tendencies are diminished overall.