Mostly safety, but for breeders sometimes it's also cosmetic reasons. It's a dangly thing that can easily be ripped right off, so removing it can potentially keep the dog from a painful situation.
Many breeds can have dewclaws, but it's often seen in working breeds. Hunting breeds may be moving through thick brush, so double dewclaws could very easily be ripped off. Removing them removes the opportunity for this to happen. In the show ring, some breeds require their removal and some breeds require them to have dewclaws. The claw of the dewclaw can also be troublesome if left untrimmed, because as it grows it curls back towards the fleshy part of the dewclaw. Obviously this could cause some major discomfort. Removal of the dewclaw also eliminates this situation.
Mudflap's foster family told me that she had double dewclaws when they found her, and they were removed when she was spayed. I'm glad, really, because she is a bull in a china closet. I could definitely see her getting herself into a pickle and ripping them off!
Gypsy has very faint scars from dewclaw removal; also glad about that because since I am planning on using her for hunting, this will be much better. She will going through some reeeally thick brush and rough terrain where she could definitely rip dewclaws off.
The dewclaws are typically removed at 3-5 days, when everything hasn't fully developed and it's easy to detach. Sometimes they are removed when the dog is spayed/neutered though.