Dewclaws are thought to be the remnant of a fifth digit that canines once used for digging, grasping and maintaining stable balance. As canines became domesticated, they became more specialized runners with longer legs and narrower feet, standing more on their toes, which caused the dewclaw to be moved further up the ankle. As the the dogs' bodies evolved, dewclaws became less important appendages. Front dewclaws are are still common in most dog breeds, but there are only a few breeds that have rear dewclaws.
Great Pyrenees
The Great Pyrenees is a working dog commonly used to guard livestock on varied types of terrain. The breed still uses its rear dewclaws for stability on the rough, uneven terrain, which is why they're functional appendages that are attached to bone. In some cases, they may have double dewclaws on the back legs.
Rear Double Dewclaws
The dog breed standard states that the Beauceron breed must have double rear dewclaws to qualify for show competitions. The Pyrenean shepherd, briard and Spanish mastiff are other breeds that have breed standards that include the rear double dewclaw. The Bouvier des Flandres may be born with rear dewclaws, but the AKC standard requires they be removed for competition.
References