We mostly dehorned our dairy cows. Why? For safety, both for us (dad) and for the cows. A cow has a whole lot of strength. Cows have different personalities: some are affectionate, some are reserved, some are plain nasty. Pair a nasty cow with horns and you have a risk of a bad injury. Even a nice cow might injure you; it'd be an accident but still an injury.
So we dehorned our cows. As soon as we could feel the nubbin of the developing horn we'd apply caustic paste which would burn away the growing point. It really hurt the calf, but it was for everyone's good. Kill dad and the cows would go for slaughter. Keep him healthy and the cows would have more years of life, before going to slaughter. Such is the logic of the dairy farm.
Now CRISPR, gene editing, promises to eliminate that source of pain. All good to my mind, but it's genetic modification. See this Mother Jones article