There is no need to see this proverb as given in the formal setting of the courtroom. This is only done by borrowing elements of a trial from near and far with little justification, and then reading these into the verse.
This tells us about the nature of folly: it is implacable. It twists and turns to avoid the thrust of any correction. It shows itself to be utterly unreasonable because it does not matter how sweetly or how severely the fool is dealt with, he will always justify himself, blame others, put a good construction on evil behaviour. The fool does not want peace with the wise, the righteous, and therefore it is futile for the wise to think that this world is ultimately capable of improvement. Folly is so deeply embedded in the heart of fallen mankind that no mere words can remove it. Only the power of God in conversion can change the fool into a wise man. Therefore let the wise use the means, the weapons that God has put at their disposal and not fall back on powerless human means. The gospel is the only effective way of bringing the dead to life. Peace is possible in limited areas and the wise must make every effort to live at peace with all men, but lasting peace requires a change of character which only God can work. How we look forward to the new heavens and the new earth.