Genesis 38:8-10 ASV

I've always wondered what the real sin was in this story. Some have said that this proves that God is against birth control. But I seriously doubt that is the case. It seems to me that the real problem was enjoying the benefits, without fulfilling his duty and honoring his dead brother. The culture in those days took family obligations very seriously. Apparently so does God. Family is very important.