1.The curly tail was bred into them by Chinese breeders. Wild pigs still have straight tails.
2.Some pig breeds have naturally curly tails while other breeds simply do not.
3.The curly tail was an evolutionary answer to pig fights. During fights, pigs will often bite one another's tail, causing serious injury. A curly tail is harder to grasp and bite.
Only domesticated pig species have curly tails and within each of those breeds, the tail may be straight or kinked, not necessarily curly. The origins of the curly tail appear to be a product of selective breeding for aesthetic purposes. Pigs have been domesticated for thousands of years and those possessing a kinked or slightly curled tail were targeted in order to increase the chances of the offspring having a curly (and hopefully moreso than their parents) tail. Through time the trait became common and the degree of curliness ever greater.
Pigs have tails because of their natural origin. The tail in curly shape was believed to have been bred by the breeders of china, the wild pigs in china do have straight tails.The curly tails that some pigs have is genetically inherited.
It is a law of nature that pigs should be born with curly tails.
The same reason why our heads are in a round form or why our feet are bigger than our hands.