Tamar conceived through committing incest with her father-in-law (Gen. 38:6-27). Morally speaking, this was deplorable and ethically speaking, it was awful. Nobody would justify this. In a sense, what Tamar did was not good at all. Nevertheless, she was righteous. The fault was not on her side, but on the side of her father-in-law, Judah, who admitted that she was more righteous than he (Gen. 38:26). You may say that there was no excuse for Tamar’s deed and that incest always involves both sides. Although Tamar may be held responsible to a certain extent, she was righteous, and she had a heart for the birthright.
In Tamar’s time, the birthright meant a great deal (Gen. 38:6-8). The birthright included a double portion of the land, the priesthood, and the kingship. The double portion of the land refers in typology to the double enjoyment of Christ. The land is Christ, and the double portion of the land is not the ordinary, common enjoyment of Christ, but something special, something extraordinary in the enjoyment of Christ. Both the priesthood and the kingship are also related to Christ. For the generation after Abraham, the birthright was altogether a matter of inheriting Christ. In Ephesians 2:12, we are told that when we were unbelievers, we were without Christ. But by believing in the Lord Jesus, we have been brought into the birthright. We have been put into Christ, Christ has become our portion, and He will even be our double portion. Through Him, in Him, and with Him we have the priesthood and the kingship. Christ Himself is our good land, our priesthood, and our kingship.
Now we can understand why Tamar was anxious to have the birthright. She knew that if she were cut off, she would be through with God’s promise. And God’s promise was simply the promise of Himself to be the portion of His chosen people in Christ. Tamar was not willing to miss this blessing.
Tamar was the wife of the first son of Judah. This son should have inherited the birthright. But Tamar’s husband was wicked in the eyes of the Lord, and the Lord took his life (Gen. 38:7). The Lord also slew Judah’s second son (Gen. 38:8-10). According to the ancient regulations, Judah should have arranged for his next son to marry Tamar in order that a son might be brought forth to inherit the birthright. Judah, however, did not fulfill his responsibility. In a sense, Judah cheated Tamar (Gen. 38:11-14). But Tamar did not give up; rather, she even used an unseemly means to obtain the birthright. Whether the means was unseemly or not, Tamar did her best to get that birthright.
EDIT (on the birthright):
The birthright included three elements: the double portion of the land, the priesthood, and the kingship. Although Reuben lost his birthright because of his defilement (Gen. 49:3-4; 1 Chron. 5:1-2). The the double portion of the land went to Joseph. This must have been due to his purity (Gen. 39:7-20). He was the son closest to his father and the one most after his father’s heart (Gen. 37:2-3, 12-17). Each of Joseph’s two sons, Manasseh and Ephraim, received a portion of the land (Joshua 16 and 17). Thus through his two sons he inherited two portions of the good land.
The priesthood portion of the birthright went to Levi (Deut. 33:8-10). In order to fulfill God’s desire, Levi forgot his parents, his brothers, and his children and only took care of God’s desire. Thus, he received the priesthood portion of the birthright.
The kingship, another portion of the birthright, was given to Judah (Gen. 49:10; 1 Chron. 5:2). The reason is when Joseph was suffering under the conspiracy of his brothers, Judah took care of him (Gen. 37:26). He also took care of Benjamin in time of suffering (Gen. 43:8-9; 44:14-34). Because of this, I believe, the kingship went to Judah.