I think wetting and drying of paper is a bit like heat treatment of steel. The fibres find a new local minimum stable position, prompted by the swelling and the shrinking.