This is one messed up family and God isn't helping any.
The Lord seems to commit the cold blooded murders of Er and Onin.
Judah lays with a harlot/daughter in law, then orders her to be burnt to death for taking his staff. He backs off at the last minute.
Joseph on the other is righteous and hard working, even as a slave in Egypt. He wins favor for his honesty and hard work and refuses the advances of his masters wife.
Once again I'm seeing a god that is a easy to anger and violence and the favored family acting only for personal gain.