The mesh liner in swim trunks can cause chafing when the fabric rubs against the skin and causes irritation, or when pebbles and sand get caught in the mesh.