38:7 And Er was wicked in the sight of the Lord - That is, in defiance of God and his law. And what came of it? Why God cut him off presently, The Lord slew him. The next brother Onan was, according to the ancient usage, married to the widow, to preserve the name of his deceased brother that died childless. This custom of marrying the brother's widow was afterward made one of the laws of Moses, Deu 25:5. Onan, though he consented to marry the widow, yet to the great abuse of his own body, of the wife he had married, and the memory of his brother that was gone, he refused to raise up seed unto his brother. Those sins that dishonour the body are very displeasing to God, and the evidence of vile actions. Observe, the thing which he did displeased the Lord - And it is to be feared, thousands, especially of single persons, by this very thing, still displeased the Lord, and destroy their own souls.
38:1-30 The profligate conduct of Judah and his family. - This chapter gives an account of Judah and his family, and such an account it is, that it seems a wonder that of all Jacob's sons, our Lord should spring out of Judah, Heb 7:14. But God will show that his choice is of grace and not of merit, and that Christ came into the world to save sinners, even the chief. Also, that the worthiness of Christ is of himself, and not from his ancestors. How little reason had the Jews, who were so called from this Judah, to boast as they did, Joh 8:41. What awful examples the Lord proclaims in his punishments, of his utter displeasure at sin! Let us seek grace from God to avoid every appearance of sin. And let that state of humbleness to which Jesus submitted, when he came to put away sin by the sacrifice of himself, in appointing such characters as those here recorded, to be his ancestors, endear the Redeemer to our hearts.