[Another interpretation of (Exodus 6:2): "And God spoke to Moses."] This is what Scripture says (Ecclesiastes 7:7): "For oppression makes a wise man foolish, etc." When the wise man busies himself with many occupations, they confuse him and turn him away from wisdom, "and destroy the heart of a gift" (ibid.) — that which is called a gift utterly departs from his heart, as it is said (Numbers 21:19): "From Mattanah to Nahaliel." Another interpretation of "For oppression makes a wise man foolish": the occupation by which the wise man busies himself with the needs of the community — these make him forget his wisdom. Rabbi Joshua ben Levi said: I learned sixty laws from Judah ben Pedayah concerning the plowing-over of a grave; but because I was occupied with the needs of the community, I forgot all of them. This is the meaning of "For oppression makes a wise man foolish, etc."
Why Communal Burdens Make a Wise Man Forget His Torah
Midrash Tanchuma Buber, Vaera 2:1
[ד"א וידבר אלהים אל משה]. זה שאמר הכתוב כי העושק יהולל חכם וגו', (קהלת ז ז), כשהחכם מתעסק בעיסוקין הרבה הן מערבבין אותו מן החכמה, ויאבד את לב מתנה (שם), מה שנקראת מתנה הוא מאד מלבו, שנאמר ממתנה נחליאל (במדבר כא יט). ד"א כי העושק יהולל חכם, עיסוק שהחכם מתעסק בצרכי צבור, הן משכחין אותו מן החכמה. אמר ר' יהושע בן לוי ששים הלכות למדתי, מיהודה בן פדייה בחרישת הקבר, ובשביל שהייתי עוסק בצרכי צבור, שכחתי את כולן הוי כי העושק יהולל וגו'.