Based on the existance of animals which born with extra heads as the form of parasite twins and the difficulty of justify multiple heads creatures.
I was thinking that a possible way to get them as realistic creatures could be the case in which the extra head or the parasite twin doesn't have "good" or enough brain functions to cause the problems related with fights between the two heads and unnecesary energetic waste.
This might have two possible ways the extra heads just having the most primitive instincts without any "intelligence" just being able to receive and percibe signals as light changes or smells, but at the end unable to take the body's decissions.
The other possibility is that extra heads don't have any cognitive capacity at all, could be malformed heads that are only capable of moving the jaws and the base of their "neck" but nothing else, basically turning into extra limbs.
I think, I remember this kind of creatures are not product of genes mutations, are more like caused by randomness process during the gestation and embryonic development but what really is a mutation is the propehensionto cause those "problem" during the embryonic development.