Maybe you are asking why we need to do this ritual cleansing upon contact with pigs?
Pork is full of fat and other nasty things. To just wash it off with water will not wash off the greasy fat left behind. One element of this ritual cleansing requires the use of abrasive clay or soil. In the past, they had no detergent. The best alternative then is that ritual cleansing with abrasive clay, which also has the properties of absorbing grease.
Now you wonder why women use clay based abrasive products for their faces?