Animals die when they touch or run over each other. To better explain, I've attached a gameplay video. The enclosure is 20x20 squares. The same happens when I walk past an animal and run into it, or push it. In summary, animals, regardless of species, lose health upon impact and die shortly afterward.
Is
/gamerule maxEntityCrammingset to 1? If so this is the expected behavior.