Human relationships are often clouded by hidden motives, hypocrisy, and deceitful words. In moments of deep suffering, the true nature of loyalty is tested, revealing whether words of comfort are genuine or merely self-serving.
The primary approach among commentators views this as a harsh critique of flattery. A person might offer smooth, hypocritical words to his friends, speaking without any real truth or understanding. However, this insincerity carries a heavy price that ultimately falls upon the next generation. The punishment for such deceit is that the flatterer's children will experience a painful longing; they will wait and hope for something they deeply desire, only to face bitter disappointment [רש״י, מצודת דוד, מצודת ציון, ביאור שטיינזלץ]. This concept serves as a direct psychological critique of Job's own companions. They abandoned their homes, leaving their children waiting endlessly for them to return, merely to put on a public show of loyal friendship and seek social praise for their smooth words [אלשיך]. Taking a slightly different angle on this deceit, the false words might not involve companions at all. Instead, the flattery is seen as a product of a person's own twisted inner thoughts and ideas [רלב״ג].
Rather than focusing on deceitful speech, another perspective frames the discussion as a theological argument about fate. Job attacks his companions because their only goal in the debate is to declare the harsh portion and punishment that God reserves for the wicked. In their arguments, the friends cruelly extend this divine punishment to the next generation, claiming that the children of the wicked will also suffer and pine away in vain. Job bitterly complains against this harsh view of divine justice [רמב״ן, תקות אנוש].
A completely different interpretation shifts the focus to a moral lesson about a person's priorities at the end of life, centering on the division of wealth. It paints a tragic picture of a dying man who, instead of preparing his soul for the afterlife, is entirely consumed by his will and the distribution of his assets to friends and strangers. All the while, his own children eagerly and impatiently wait for his death so they can finally claim their inheritance [מלבי״ם].