Snakes are silly.  One head may attack the other even if it just smells like prey.  These anomalies do pretty well in captivity, though.  The term for this two-headedness is bicephaly or dicephaly (used interchangeably).