Another interpretation: that he should not set up beside him an advocate [a partisan pleader], as it is said, "the cause of both parties shall come before the judges" (Exodus 22:8). Rabbi Nathan says: "Keep far from a false matter" - this is a warning to keep away from heresy (epikorsut). And so it says, "And I find more bitter than death [the woman whose heart is snares and nets]" (Ecclesiastes 7:26). And it says, "but the king shall rejoice in God" (Psalms 63:12).
Keep Far From Heresy and the Bitterness of the Strange Path
Yalkut Shimoni on Torah 352:13
דָּבָר אַחֵר, שֶׁלֹּא יַעֲמִיד אֶצְלוֹ סָנֵיגֵרוֹן, שֶׁנֶּאֱמַר (שמות כב, ח) "עַד הָאֱלֹהִים יָבֹא". רַבִּי נָתָן אוֹמֵר, מִדְּבַר שֶׁקֶר תִּרְחָק, הֲרֵי זֶה אַזְהָרָה לִפְרֹשׁ מִן הָאֶפִּיקוֹרְסוּת. וְכֵן הוּא אוֹמֵר (קהלת ז, כו) "וּמוֹצֵא אֲנִי מַר מִמָּוֶת" וְגוֹ'. וְאוֹמֵר "וְהַמֶּלֶךְ יִשְׂמַח בֵּאלֹהִים" וְגוֹ'.