Dogs have floppy ears due to genetic traits that have been selectively bred over generations. Floppy ears are a common trait in many dog breeds and are often preferred for their appearance. The specific genes that control ear shape can vary among different breeds, leading to floppy ears in some dogs and upright ears in others.