Paul quoted the Law here as a way to show the right procedure to address the situation at hand:
2Co 13:1 NKJV - (1) This [will be] the third [time] I am coming to you. "By the mouth of two or three witnesses every word shall be established."
Deu 19:15 NKJV - (15) "One witness shall not rise against a man concerning any iniquity or any sin that he commits; by the mouth of two or three witnesses the matter shall be established.
I believe the Law, which is given by the Holy and Righteous God, can show us how to address certain situations rightfully, and of course, contextualizing it to the New Covenant.