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.
I have seen too many hind dew claws ripped off to ever want them on my dogs, I would remove hind dew claws without question, however I leave the front ones alone, unless we have problems with them, which I never have. The controversy is that some people believe the dog actually uses them when cornering at a fast pace, and that injury and arthritis can arise from removal of front dew claws... I have no idea if it's true or not, there are alot of arguments for both sides... but I say leave the front ones unless there's an issue.
Oka has front ones - and they are very sharp - they are not long enough to cut though . back dew claws, as said above, do get damaged. That said they aren't always just skin - Oka's have bones in. Oks uses hers to help grip bones and such, not sure if they are useful for cornering - interesting!!
I was told once that back dewclaws, especially double ones are a sign of poor breeding - though i don't know how true that is!