“So even though I wrote to you, it was neither on account of the one who did the wrong nor on account of the injured party, but rather that before God you could see for yourselves how devoted to us you are. By all this we are encouraged.” 2 Corinthians 7:12-13
Paul exaggerates to make a point. There was such benefit from his ‘painful’ letter, that it seems like the sole purpose of him sending it was to enjoy the process of reconciliation. It wasn’t, but the joy of restoration is always wonderful regardless of the issue that initiates it.