Understanding the difference between the Author of the Book and the god-of-this-planet, may be essential here.
No "forcing" apparent, and nothing known about Tamar's family. Setting the stage (precepts) of marriage, and how our 'brother' JESUS died w/o "fruit", so we may raise up His Name when we're fruitful. The 2 Covenants involved also, and Judah is important to the Pedigree.
And all the people went "to make great mirth, because they had understood the words that were declared unto them". Neh8:12
"The foolishness of God is wiser than men; the weakness of God is stronger than men". 1Cor1:25
Dux allows: "It is the glory of God to conceal a thing: but the honour of kings is to search out the matter". Pr25:2