Judah gets involved with a prostitute that uses sex as a form of worship to a false god. As a great-grandfather of Jesus, this act is tremendously ill-advised. It breaks not only the marriage covenant, but also the Abrahamic covenant of exclusive intimacy with the one true God. What happens when he is exposed? Watch 7 minutes.
https://www.youtube.com/channel/UCNijvDWAn2Wv2KFun2AnvCA