So who decides which bits of the bible are relevant? You? The bits that fit your version of how life should be lived?
News flash! Its called cherry picking! Its dishonest. You should be asking instead: Why would an all powerful god ALLOW his precious book to become tainted by immoral writers in the first place? Did he allow it, or didn't he have control over it. Why is that? Cant or wont? Does he even exist?
By the way, waxing lyrical using floaty christian effusive language doesn't make you more religious or godly. It makes you come across as a bit mad. Just saying....