What were Shar-Pei bred for?

What were Shar-Pei bred for?
Chinese Shar-Pei were originally bred for various practical purposes, including hunting wild boar and other game, herding and guarding livestock from predators and thieves. Unfortunately, Shar-Pei were also bred for dog fighting. The loose, wrinkled skin of the Shar-Pei helped reduce the damage they would sustain in fights, allowing them to twist and turn in their skin if bitten by an opponent.