L’Ecclésiaste 4:9 Midrash : Midrash Aggadah, Mekhilta DeRabbi Shimon Ben Yochai, Shemot Rabbah & Midrash Tehillim

טוֹבִ֥ים הַשְּׁנַ֖יִם מִן־הָאֶחָ֑ד אֲשֶׁ֧ר יֵשׁ־לָהֶ֛ם שָׂכָ֥ר ט֖וֹב בַּעֲמָלָֽם׃

Être à deux vaut mieux que d’être chacun seul; car c’est tirer un meilleur profit de son travail.

Midrash Aggadah

Another thing is why in the second letter, against male and female, it is written that there is no confusion between creation and completion (Isaiah 45:18), and the wise man said that the two years are better than the one (Ecclesiastes 4:9).

Mekhilta DeRabbi Shimon Ben Yochai

And the anger of the Lord was kindled against Moses. Rabbi Eliezer ben Arach said: The Holy One, blessed be He, spoke to Moses in a worldly manner so that the denigrators of the world would not say that because He is a deity and the master of the world, He did not act justly. Therefore, the Holy One, blessed be He, implored Moses for six days, as it is written: "even yesterday, even three days ago, ever since you spoke to your servant," and on the seventh day, He said to him, "Please send by the hand you will send."
He gave a parable: To what is this matter comparable? To a king who had a servant, and he loved him with a complete love. The king wanted to appoint him as a steward to sustain the royal children. What did the king do? He took his servant by his hand and brought him into his treasure house, showing him silver, gold, precious stones, and pearls, and everything he had in his treasure house. He then took him to the field and showed him gardens and orchards and everything he had in the field. The servant extended his hand and said, "I cannot become a steward to sustain the royal children." The king became angry and said to him, "If you cannot become a steward, why did you bother me with all this effort?" He swore that the servant would not enter the threshold of his palace.
So too, the Almighty implored Moses for six days on His mission to Egypt, and on the seventh day, He said to him, "Please send by the hand you will send." The Holy One, blessed be He, said to Moses, "You say to me, 'Please send by the hand you will send.' Joshua, your student, and your disciple, will bring Israel into the land. You will not enter the land with them," as it is said, "Therefore you shall not bring this assembly."
Moses replied and said before the Holy One, blessed be He, "Master of the Universe, you tell me to go down to Egypt and bring out the Children of Israel from Egypt. Surely I am a messenger. Two missions to one person at one time? My Lord, this mission is better with two people, as one," as it is said, "Two are better than one," and it is inferred, "By the mouth of two witnesses shall a matter be established."
The Holy One, blessed be He, replied and said to Moses, "I will inform you of whom you stand before and ask for mercy that you and he go on my mission to Egypt. The Holy Spirit has already rested upon him, and he goes out and awaits you on my behalf to Egypt. Now when he sees you, he will be like the sun," as it is said, "And behold, he is coming out to meet you, and when he sees you, he will be glad in his heart."
The Holy One, blessed be He, replied and said to Moses, "Initially, when I revealed myself to you at the bush, you hid your face from me," as it is said, "And Moses hid his face." "Now, when have you been given the opportunity to speak to me like a servant to a human master who has permission to speak to his master?"
Moses spoke and said, "I have no messengers, I have no troops, I have no seraphim, I have no wheels, I have no ministering angels, and I have no heavenly chariots to send and bring out my children from Egypt. You tell me, 'Please send by the hand you will send.' I am the one who called the world from the east of the sun to its setting. From that law, you are fit for washing immediately. But what can I do, for I am merciful." Thus, it is said, "And God spoke to Moses and said to him, 'I am the Lord.'"
And the sages say: The Holy One, blessed be He, said to Moses, "Moses, the merit of Amram, your father, stood by you. He did a great deed in Israel. When Egypt imposed hard labor on Israel and cast them into the Nile, they said, 'We marry women, beget sons, and the Egyptians cast them into the Nile. Why do we toil in vain?' Amram arose and did a great deed in Israel, and his mind agreed with the mind of the place (God). He divorced his wife when she was pregnant for three months. At the end of three months, he remarried her, as it is said, 'And a man from the house of Levi went and took the daughter of Levi.' And the ministering angels clapped before her like grooms and brides," as it is said, "If sons, then joy." And the Egyptians calculated nine months for her, and she gave birth within six months.
Why was this necessary? Either Amram took a wife, or he did not. Rather, to inform all who come to the world of the merit of Amram the righteous. Moses replied and said before the Holy One, blessed be He, "Master of the Universe, you tell me to go down to Egypt and bring out sixty myriads from under the burdens of Egypt. I fear for the people, for I fled from them." He said to him, "Do not fear, Moses. They have already died," as it is said, "For all the men who sought your life are dead."
The Holy One, blessed be He, replied and said to Moses, "Moses, you say to me, 'I fear for the people, for I fled from them.' The people who sent Pharaoh to capture you, who made them mute, who made them deaf, who made them blind, is it not I, the Lord?" Rabbi Eliezer ben Yehuda of Bartota says: Moses replied and said before the Holy One, blessed be He, "Master of the Universe, you tell me to go down to Egypt and bring out sixty myriads from under the burdens of Egypt. If you had loosened them for a year or two before speaking, things would already be done. But they were enslaved for 210 years. Pharaoh will say to me, 'A slave who served for ten years and no creature protested against him, another will come and take him from his hand? Or one who worked the vineyard for ten years and no creature protested against him, another will come and take it from his hand?' Master of the Universe, these things you tell me are heavy and burdensome," as it is said, "For I am slow of speech and slow of tongue."

Shemot Rabbah

“It was when Pharaoh let the people go, God did not lead them via the land of the Philistines, although is was near, as God said: Lest the people reconsider when they see war and return to Egypt” (Exodus 13:17).
“It was when Pharaoh let the people go” – that is what the verse says: “A whip for the horse, and a bridle for the donkey” (Proverbs 26:3). “A whip for the horse,” this is the first Pharaoh, as it is stated: “The Lord afflicted Pharaoh…over the matter of Sarai, Abram’s wife” (Genesis 12:17). Why does the verse state: “Abram’s wife”? “Two are better than one” (Ecclesiastes 4:9),1Pharaoh was struck due to the merit of both Abraham and Sarah. and it says: “He was good to Abram for her sake” (Genesis 12:16).2This demonstrates that the miracle was due to Abraham’s merit as well as Sarah’s merit.
“A bridle for the donkey,” this was Avimelekh. When? “As the Lord had closed all the wombs of the house of Avimelekh” (Genesis 20:18). He began praising himself and saying: “In the innocence of my heart and the cleanliness of my hands I did this” (Genesis 20:5). [God responded:] “I withheld you from sinning against Me” (Genesis 20:6). To what is this matter comparable? It is comparable to a donkey upon which a person was riding, which saw a baby in the street. He jumped over it and did not harm it. They began praising the donkey that jumped over the baby and did not harm it. Its owner said to them: ‘By your lives, were it not for me who pulled [it away with] the bridle in its mouth, it would have harmed it.’ Similarly, they said: ‘Avimelekh was upright that he did not draw near to Sarah.’ The Holy One blessed be He said to them: ‘He sought to do so, but I did not allow him to do so, and it was I who pulled him [away], as it is stated: “Lord, do not grant the desires of the wicked” (Psalms 140:9). That is why it says: “A bridle for the donkey.”
“A staff for the back of fools” (Proverbs 26:3) – this is Pharaoh and the Egyptians. Since they were devastated with the plagues, they freed Israel against their will, as it is stated: “It was when Pharaoh let [the people] go.” [The story of] Avimelekh, to what is it comparable? It is to one who entered the king’s palace and took his treasure chest in the dark. He went out and was apprehended. The king said to him: ‘What is in your hand?’ He was afraid. He said to him: ‘Why are you afraid? Did you take something from the palace?’ He said: ‘No.’ ‘What is this treasure chest? Who gave it to you?’ So, Avimelekh said before God: “Will you also kill a righteous nation?” (Genesis 20:4). [Avimelekh] said to Him: ‘You know that I did not touch her.’ [God] said to him: ‘And what is a man’s wife doing with you? Now send her away, as she is a married woman.’ “Behold, you will die, because of the woman whom you have taken…return the man's wife, as he is a prophet, and he will pray for you (Genesis 20:3,7).
What is “and he will pray for you”? It is analogous to a head of state who sent his slave to the judge [so the judge would] flog him. He began pleading to the judge. The judge said to him: ‘You did nothing to me, let your master say so and I will let you alone.’ So, God said: ‘Abraham entrusted his grievance to Me last night, and I dictated that I “execute justice for the oppressed” (Psalms 146:7) and you oppressed him. If he prays for you I will leave you alone,’ as it is stated: “And he will pray for you and you will live” (Genesis 20:7).
“And a bridle for the donkey” – [the story of] Pharaoh, to what is it comparable? It is [comparable] to a certain herdsman who would herd pigs. He found one sheep and took it among them. Its owner [who was the king,] sent to him and said: ‘Give me my sheep.’ He said to him: ‘You have no sheep with me.’ The owner said [to his servants]: ‘Inform me from where he waters his animals.’ They went and informed him, and he sealed the springs. He said to him: ‘Send me my sheep.’ He said to him: ‘You have no sheep with me.’ The owner said: ‘Inform me where he rests his animals.’ They went and informed him, and he destroyed the pens. He said to him: ‘Send me my sheep.’ He said to him: ‘You have no sheep with me.’ The owner said: ‘Inform me where he grazes [his animals].’ They went and informed him, and he burned all the grass that he had. He said to him: ‘Send me my sheep.’ He said to him: ‘You have no sheep with me.’ He said: ‘Inform me where his son goes to school.’ He went and abducted his son. He said to him: ‘Send me my sheep.’ He said to him: ‘Here is your sheep.’
He was herding [his pigs] and then [the king] incarcerated him with his son. He said to him: ‘Now your sheep is no longer with me, why are you incarcerating me? What else do I have of yours?’ He said to him: ‘I demand of you everything to which it gave birth, and its shearings all the days that it was in your possession.’ He began screaming and saying: ‘If only I had not given it to you, and people would say [about me:] He stood by his word and did not send it to him, and it was [the king] who sought to kill him.’
So, the king [in the parable] is the King of kings, the Holy One blessed be He, the sheep is Israel, the pig herdsman is Pharaoh. Israel descended to Egypt and [Pharaoh] imposed taxes upon them, as it is stated: “They imposed upon them taskmasters” (Exodus 1:11), and it says: “Every son that is born [you shall cast him into the river]” (Exodus 1:22). The Holy One blessed be He began saying to Moses, to say to Pharaoh: “Let My people go, and they will serve Me” (Exodus 7:16). He went and said it to him. [Pharaoh] began saying: “Who is the Lord that I should heed His voice?” (Exodus 5:2). Moses began and said to the Holy One blessed be He: ‘He is saying “who is the Lord” and does not wish to let them go.’ [God] said to him: ‘Where does Egypt drink?’ He said to Him: ‘From the Nile.’ He said to him: ‘Transform it into blood.’ He said: ‘I cannot transform it. Is there a person who drinks from a well who throws a stone into it?’ He said to him: ‘Let Aaron go and turn it [into blood].’ Aaron went and struck it and it turned into blood. Why did Moses not strike it? He said: ‘I was thrown into it and it did not harm me.’ That is why Aaron struck it. The Egyptians began seeking [water] to drink but were unable to find any.
He again said: ‘Let My people go,’ but [Pharaoh] did not wish to do it. [God] said to [Moses]: ‘Where do his animals graze?’ [Moses responded:] ‘In the wilderness.’ He sent hail upon them and broke every tree of theirs and burned everything, as it is stated: “There was hail, and fire flaming…” (Exodus 9:24). Then he sent locusts against them, which ate all the vegetation on the trees, and he took his staff and burnedall the animals, as it is stated: “Behold, the hand of the Lord [is upon your livestock… a very severe pestilence]” (Exodus 9:3). He brought upon him all the plagues, but he did not want to let them go. Then He took his son and incarcerated him, as it is stated: “The Lord smote every firstborn” (Exodus 12:29). At that moment, he said: “Arise and depart” (Exodus 12:31).
[Pharaoh] pursued them, and [God] seized him and incarcerated him alongside his son, as it is stated: “He tossed Pharaoh and his army into the sea” (Psalms 136:15). Pharaoh began saying: ‘If only I had not let them go, and [people] would say: See, a man who stood by his word, [for now even though I have] let them go, He is killing me; that is: “A staff for the back of fools.” Why does it say “staff” in their regard? It is because all the first plagues did not affect them until He brought the boils upon them. Once they were afflicted [by boils], they said to each other: ‘This is a harsh plague.’ The expression “staff” means nothing other than boils, as Job says: “Let Him remove His staff from upon me” (Job 9:34).3Job had been struck by boils – see Job 2:7. That is why it is stated: “A staff for the back of fools.” Pharaoh said: ‘My people were stricken and He killed my son and his children are departing.’ Once he let them go, he began crying: ‘Woe, woe [vai vai]’– that is: “It was [vayhi] when Pharaoh let the people go.”