This story may seem a bit confusing because there was a significant cultural difference between our days and this time. There is also an element where some of the issues of that day are still moral issues we face today.
There is something that I think we can see that is still an issue that has transcended culture. Judah was quick to call out Tamar for acting as a prostitute and her pregnancy. There seems
to be no problem for him to call out her wrong. Yet, he was guilty of immoral behavior and seems to initially ignore that. He wanted punishment for Tamar, but he saw himself as without issue. It was easy to see her sin, yet at the same time he was happy to ignore his own. Do we still sometimes struggle with this today? It is easy to see all of the bad things in other people's lives, yet we don't want to look as closely at our own. Remember what Jesus said- remove the plank from our own eye before we work on the speck in our brother's eye. In other words- get the person in the mirror right before you focus on the wrongs of everyone else.