Ecclesiastes is a contemplation of meaning by the philosopher king (notionally Solomon), who calls himself Qoheleth. Unlike most wisdom literature in the Bible, which is phrased as dialog between the wise teacher and the student reader1, this text is semi-autobiographical meditations that dwell on the vanity of various aspects of life. The crux of the book is that all is הֶבֶל or futile. A literal translation would be "breath" or "vapor"; all is here today and gone tomorrow. As Sufi poets put it, "This too shall pass".
For instance, the passage just before the one in question notes that a person working for themselves and not for another is empty:
Again, I saw vanity under the sun: one person who has no other, either son or brother, yet there is no end to all his toil, and his eyes are never satisfied with riches, so that he never asks, “For whom am I toiling and depriving myself of pleasure?” This also is vanity and an unhappy business.—Ecclesiastes 4:7-8 (ESV)
Aristotle examines the same line of reasoning when he contemplated ethics. He concluded that when people are performing their intended function, they will achieve εὐδαιμονία (roughly speaking, happiness). Qoheleth would disagree2 in the case when a person has no other to support or be supported by. Merely performing a function does not achieve happiness in this case.
So Qoheleth considers the opposite case:
Two are better than one, because they have a good reward for their toil. For if they fall, one will lift up his fellow. But woe to him who is alone when he falls and has not another to lift him up! Again, if two lie together, they keep warm, but how can one keep warm alone? And though a man might prevail against one who is alone, two will withstand him—a threefold cord is not quickly broken.—Ecclesiastes 4:9-12 (ESV)
Now this situation is certainly better than the first, but this passage focuses entirely on the practicality of working together. Qoheleth makes no attempt to indicate that having a partner is ultimately meaningful. In fact, he goes on to say that even the king, who in ancient Near East culture was the hub of society, ultimately fails to find meaning:
Better was a poor and wise youth than an old and foolish king who no longer knew how to take advice. For he went from prison to the throne, though in his own kingdom he had been born poor. I saw all the living who move about under the sun, along with that youth who was to stand in the king's place. There was no end of all the people, all of whom he led. Yet those who come later will not rejoice in him. Surely this also is vanity and a striving after wind.—Ecclesiastes 4:13-16 (ESV)
Perhaps the most direct answer to the question is that rope technology serves as an ideal illustration of the practical benefits of working together. A single strand ravels easily and does a poor job of distributing load to its component fibers. Laying two strands, which would be the natural illustration of the point, results in a rope that is little better than the twine itself. Four or more strand ropes give up a degree of pliability and are more complicated to manufacture for marginal gains in strength. To this day, three-ply or plain laid rope is only rivaled in popularity by synthetic, braided ropes. Three turns out to be the sweet spot when it comes to rope strands.3
The closest Qoheleth comes to finding meaning in life is his final thought:
The end of the matter; all has been heard. Fear God and keep his commandments, for this is the whole duty of man. For God will bring every deed into judgment, with every secret thing, whether good or evil.—Ecclesiastes 12:13-14 (ESV)
Broadly speaking, this conclusion aligns with the rest of the Tanakh going back to Genesis 1:26. Reading this text back into Ecclesiastes 4:12 could lead us to the idea that the ideal situation for a person is to have a proper relationship with both a partner and with God. My wife and I, in fact, interpreted the text this way when we chose it as a motto for our marriage. Together we gain strength to face the world and with God we find meaning in it.
Now finding the Christian doctrine of the Trinity in this text might be a bridge too far, but the attempt could be made starting from this portion of Ecclesiastes:
I perceived that whatever God does endures forever; nothing can be added to it, nor anything taken from it. God has done it, so that people fear before him. That which is, already has been; that which is to be, already has been; and God seeks what has been driven away.—Ecclesiastes 3:14-15 (ESV)
The silver cord of our life will eventually be snapped and our endurance against the troubles of the world will cease. But God is different: He endures. If the Christian thesis is true, however, God became man and suffered death. The reason, according to Jesus' followers, is so that God could reconcile the broken relationship between Himself and His creation. In a way, it ties back to the idea of a rope: the strands must be the same size in order to be twisted together. So if you take the idea that a three-strand rope represents a meaningful life that is intertwined with others and with God, the one person of the Trinity who can serve in that function is Christ.
And of course, this can be seen as an image of how God Himself exists according to Trinitarian doctrine. The Father, Son, and Spirit are equal strands bond together in a tight relationship with each other. God is not a superman contemplating his work from a fortress of solitude, but a dynamic relationship active in the world we live in.
Or the more complicated dialog found in the Song of Solomon, which includes at least the man, the woman, and her female attendants. Or the equally complicated dialog between Job, his friends, and God.
But an earlier passage expresses the core of εὐδαιμονία:
What gain has the worker from his toil? I have seen the business that God has given to the children of man to be busy with. He has made everything beautiful in its time. Also, he has put eternity into man's heart, yet so that he cannot find out what God has done from the beginning to the end. I perceived that there is nothing better for them than to be joyful and to do good as long as they live; also that everyone should eat and drink and take pleasure in all his toil—this is God's gift to man.—Ecclesiastes 3:9-13 (ESV)
Qoheleth goes further than Aristotle when he proposes that "[God] has put eternity into man's heart"—a phrase well worth contemplating.
The text takes advantage of the break in parallelism to utilize graded numerical parallelism. In this case the message seems to be simply that "
X things are better than one".