It is well understood that Judah was in sin at this time in his life, and that his lying with a harlot was heaping sin upon sin, the icing on the cake, the straw that broke the camel's back. First, he sinned against his brother, Joseph, when he became jealous of him, causing the next sin, desiring to kill him, causing the next sin, putting him in a pit and selling him as a slave, causing the next sin, lying to his father, causing the next sin, leaving his father's house before marriage and going to live among the Canaanites, causing the next sins, taking a Canaanite wife, befriending a Canaanite, resulting in evil offspring who were killed by YHUH, leading to his trip with his not virtuous friend to shear his sheep, happening upon Tamar who he thinks is a harlot. Here's the text I was speaking of that leads me to believe that he was ashamed of his deed with "a harlot":
Meanwhile Judah sent the young goat by his friend the Adullamite in order to get his pledge back from the woman, but he did not find her. He asked the men who lived there, “Where is the shrine prostitute who was beside the road at Enaim?” “There hasn’t been any shrine prostitute here,” they said. So he went back to Judah and said, “I didn’t find her. Besides, the men who lived there said, ‘There hasn’t been any shrine prostitute here.’” Then Judah said, “Let her keep what she has, or we will become a laughingstock. After all, I did send her this young goat, but you didn’t find her.” About three months later Judah was told, “Your daughter-in-law Tamar is guilty of prostitution, and as a result she is now pregnant.” Judah said, “Bring her out and have her burned to death!” As she was being brought out, she sent a message to her father-in-law. “I am pregnant by the man who owns these,” she said. And she added, “See if you recognize whose seal and cord and staff these are.” Genesis 38:20-25
Judah told Hirah to forget about getting back his identification lest they become a laughing stock. He was ashamed, or else they would not need to worry about people laughing at them. Also, Judah says Tamar is worthy of death for prostituting herself. Why would it not be a sin for him to lie with a prostitute if he condemns her for prostitution, a sin deserving death? HE WAS THE ONE WHO SLEPT WITH THE PROSTITUTE AND HE CONDEMNS HER TO DEATH?! Do you see, Samuel, how your understanding in the matter sounds hypocritical? I must say, it does sound like a typical man's response perspective, though, lol, it's not a sin to sleep with a harlot but the harlot must die for sleeping with her customer, lol. We see that Tamar knew Judah would be ashamed and that he was in sin and she concealed his sin by sending a private messenger to Judah with the identity of the father. I imagine that if Judah would have been travelling with his father, Jacob, he would not have veered off the path to shear his sheep to sleep with a harlot. Thankfully this whole realization by Judah, that Tamar was more righteous than he, that he was a sinner, was key to leading him to repentance and going back to His father's house and going with them down into Egypt at the time of the famine leading them to realize Joseph was still alive and it was all for a reason.
Another example in scripture that demonstrates that sex does not equal marriage, is Joseph's marriage to Mary. She was a virgin, had never been with a man, and Joseph was considering divorcing her when he realized she was pregnant. If they aren't joined with vows, there's no reason for divorce, because sex has not happened yet.
Then Joseph being raised from sleep did as the messenger of YHUH had bidden him, and took unto him his wife: And knew her not till she had brought forth her firstborn son: and he called his name Yahusha. Matthew 1:24-25
Here it says Joseph TOOK Mary UNTO HIM as HIS WIFE, and knew her not until after Yahusha was born. Remember, before Yahusha was born, they travelled together as a married couple to register as a family where JOSEPH was from, so she left her father's house and clung to her husband and became a family as a married couple with Joseph as her head, before sex, before Yahusha was born.
We need to make sure we understand the law before we start making judgements on it. If you say sex is marriage, then you condemn me, my husband, and many others who have had sex before marriage, you condemn our union as a married couple, and falsely according to scripture, according to the laws of marriage, divorce, adultery, fornication, etc...I and my husband repented of sexual sin, namely fornication, before marriage. We did not commit fornication with one another before marriage, nor did we ever commit adultery by sleeping with someone who was married or not biblically divorced. We are not adulterers, nor were we ever, but we WERE fornicators, though not anymore, as we turned from that sin. Adultery is a specific type of fornication having to do with vows. Context throughout the Old and New Testaments shows a distinction. There are different words in the Greek, porneia is fornication, adultery is moicheuo. Learn the law, then you learn to judge righteously, be very careful not to judge in error, lest you falsely accuse and misinterpret the law, and you sin.