How does deformation in animals happen?

Sometimes this just happens. Maybe there was a close relation between the parents. Contamination of chemical wastes have created issues - cancer patterns, etc - in humans. Something similar may have been involved. But often it simply just is one of those things.